Apply Python 3 futurize transform lib2to3.fixes.fix_except

This commit is contained in:
Eklavya Sharma 2016-03-10 18:23:26 +05:30 committed by Tim Abbott
parent 8c188cda49
commit 5272ca0674
5 changed files with 6 additions and 6 deletions

View file

@ -44,7 +44,7 @@ import sys
try:
import dateutil.parser
import dateutil.tz
except ImportError, e:
except ImportError as e:
print >>sys.stderr, e
print >>sys.stderr, "Please install the python-dateutil package."
exit(1)

View file

@ -40,7 +40,7 @@ from datetime import datetime, timedelta
try:
import dateutil.parser
except ImportError, e:
except ImportError as e:
print >>sys.stderr, e
print >>sys.stderr, "Please install the python-dateutil package."
exit(1)

View file

@ -87,7 +87,7 @@ def mkdir_p(path):
# Python doesn't have an analog to `mkdir -p` < Python 3.2.
try:
os.makedirs(path)
except OSError, e:
except OSError as e:
if e.errno == errno.EEXIST and os.path.isdir(path):
pass
else: