From: Vincent Le Gallic Date: Mon, 26 Nov 2012 19:45:54 +0000 (+0100) Subject: Il est possible que l'exception n'ait pas d'args X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=009ee1105f7b7502dcc377e9faffdc37f59edb71;p=python-myirclib.git Il est possible que l'exception n'ait pas d'args --- diff --git a/safesystemcall.py b/safesystemcall.py index 01ad3e3..bc08691 100644 --- a/safesystemcall.py +++ b/safesystemcall.py @@ -16,7 +16,7 @@ def systemcall(meth): try: rv = meth(*args, **kwargs) except Exception as why: - if type(why.args) == tuple and why.args[0] == 4: + if type(why.args) == tuple and len(why.args)>=1 and why.args[0] == 4: continue else: raise