]> gitweb.pimeys.fr Git - python-myirclib.git/commitdiff
Il est possible que l'exception n'ait pas d'args master
authorVincent Le Gallic <legallic@crans.org>
Mon, 26 Nov 2012 19:45:54 +0000 (20:45 +0100)
committerVincent Le Gallic <legallic@crans.org>
Mon, 26 Nov 2012 19:45:54 +0000 (20:45 +0100)
safesystemcall.py

index 01ad3e3c19632f8b492ff2dccf3e40ab894652cd..bc08691a910576af96d03566f8ea17f918e8acaa 100644 (file)
@@ -16,7 +16,7 @@ def systemcall(meth):
             try:
                     rv = meth(*args, **kwargs)
             except Exception as why:
             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
                     continue
                 else:
                     raise