running lib2to3.fixes.fix_except
This commit is contained in:
1 parent
14830e8906
commit
35900da19b
35 files changed
+93
-92
No files matched your search
@@ -650,7 +650,7 @@ def replace_components(text, env):
|
||||
pass
|
||||
try:
|
||||
f = f(**b) if isinstance(b, dict) else f(b)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
f = 'ERROR: %s' % e
|
||||
return str(f)
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ def removeall(path):
|
||||
def rmgeneric(path, __func__):
|
||||
try:
|
||||
__func__(path)
|
||||
except OSError, (errno, strerror):
|
||||
except OSError as xxx_todo_changeme:
|
||||
(errno, strerror) = xxx_todo_changeme.args
|
||||
print ERROR_STR % {'path': path, 'error': strerror}
|
||||
|
||||
files = [path]
|
||||
|
||||
Reference in new issue
Block a user