except Ex, e: --> except Ex as e:

Nudge us towards python3 compatability by converting deprecated python2 syntax.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth
2012-02-05 10:14:23 +01:00
parent 7f22d89872
commit 0844d27f9f
12 changed files with 36 additions and 36 deletions

View File

@ -98,7 +98,7 @@ class MaildirRepository(BaseRepository):
self.debug("makefolder: calling makedirs '%s'" % full_path)
try:
os.makedirs(full_path, 0700)
except OSError, e:
except OSError as e:
if e.errno == 17 and os.path.isdir(full_path):
self.debug("makefolder: '%s' already a directory" % foldername)
else:
@ -106,7 +106,7 @@ class MaildirRepository(BaseRepository):
for subdir in ['cur', 'new', 'tmp']:
try:
os.mkdir(os.path.join(full_path, subdir), 0700)
except OSError, e:
except OSError as e:
if e.errno == 17 and os.path.isdir(full_path):
self.debug("makefolder: '%s' already has subdir %s" %
(foldername, subdir))