From 009ee1105f7b7502dcc377e9faffdc37f59edb71 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Mon, 26 Nov 2012 20:45:54 +0100 Subject: [PATCH] Il est possible que l'exception n'ait pas d'args --- safesystemcall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2