diff --git a/bots/check-mirroring b/bots/check-mirroring index bfc5588..775c7e8 100755 --- a/bots/check-mirroring +++ b/bots/check-mirroring @@ -163,7 +163,7 @@ for tries in xrange(10): if missing == 0: actually_subscribed = True break - except IOError, e: + except IOError as e: if "SERVNAK received" in e: logger.error("SERVNAK repeatedly received, punting rest of test") else: diff --git a/bots/log2zulip b/bots/log2zulip index 8907a72..449ddeb 100755 --- a/bots/log2zulip +++ b/bots/log2zulip @@ -20,7 +20,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: @@ -98,6 +98,6 @@ if __name__ == "__main__": finally: try: os.remove(lock_path) - except OSError, IOError: + except OSError as IOError: pass diff --git a/integrations/asana/zulip_asana_mirror b/integrations/asana/zulip_asana_mirror index 9729af9..b5b498a 100755 --- a/integrations/asana/zulip_asana_mirror +++ b/integrations/asana/zulip_asana_mirror @@ -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) diff --git a/integrations/codebase/zulip_codebase_mirror b/integrations/codebase/zulip_codebase_mirror index 847cef6..1bab1a8 100755 --- a/integrations/codebase/zulip_codebase_mirror +++ b/integrations/codebase/zulip_codebase_mirror @@ -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) diff --git a/integrations/rss/rss-bot b/integrations/rss/rss-bot index 20070ca..73469f2 100755 --- a/integrations/rss/rss-bot +++ b/integrations/rss/rss-bot @@ -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: