Skip to content

Commit

Permalink
Fix obsolete catch tuple syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
creachadair committed Jul 22, 2020
1 parent 3a74d80 commit 1de93c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions eyepopper.py
Expand Up @@ -511,7 +511,7 @@ def cmd_ADDBOX(self, cmd, data):
self.server.mail_add_mailbox(data)
self.wfile.write('+OK Mailbox added %s\r\n' % data)
self._diag('- Client requested mailbox "%s".', data)
except (OSError, IOError), e:
except (OSError, IOError) as e:
self.wfile.write('-ERR Mailbox not added (%s)\r\n' % e.strerror)

def handle(self):
Expand Down Expand Up @@ -565,7 +565,7 @@ def handle(self):

self._diag('* REQUEST COMPLETE\n')

except socket.error, e:
except socket.error as e:
pass

self.wfile.close()
Expand Down Expand Up @@ -613,7 +613,7 @@ def usage(short=True):
opts, args = getopt.gnu_getopt(
argv, 'haEp:qu:',
('help', 'apop', 'noerror', 'port=', 'quiet', 'user='))
except getopt.GetoptError, e:
except getopt.GetoptError as e:
print >> sys.stderr, "Error: %s" % e
usage()
return 1
Expand Down Expand Up @@ -662,7 +662,7 @@ def usage(short=True):
boxes.append(Maildir(path))
else:
boxes.append(MailboxFile(path))
except (OSError, IOError), e:
except (OSError, IOError) as e:
print >> sys.stderr, "Error: %s" % e
return 2

Expand Down

0 comments on commit 1de93c8

Please sign in to comment.