From: Vincent Le Gallic Date: Mon, 30 Jul 2012 16:28:28 +0000 (+0200) Subject: On teste que le code d'erreur et pas son message parce que si on change les locales... X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=0c2fb077750c0f2fb423f61d71106ebbe55393dd;p=python-myirclib.git On teste que le code d'erreur et pas son message parce que si on change les locales, il est traduit --- diff --git a/safesystemcall.py b/safesystemcall.py index f191140..01ad3e3 100644 --- a/safesystemcall.py +++ b/safesystemcall.py @@ -16,7 +16,7 @@ def systemcall(meth): try: rv = meth(*args, **kwargs) except Exception as why: - if why.args == (4, "Interrupted system call"): + if type(why.args) == tuple and why.args[0] == 4: continue else: raise