diff roundup/scripts/roundup_server.py @ 5248:198b6e810c67

Use Python-3-compatible 'as' syntax for except statements Many raise statements near these are also fixed. So are two ivorrect file encoding marks ('utf8'->'utf-8').
author Eric S. Raymond <esr@thyrsus.com>
date Thu, 24 Aug 2017 22:21:37 -0400
parents a9ace22e0a2f
children e9158c0a6eba
line wrap: on
line diff
--- a/roundup/scripts/roundup_server.py	Thu Aug 24 17:55:02 2017 -0400
+++ b/roundup/scripts/roundup_server.py	Thu Aug 24 22:21:37 2017 -0400
@@ -204,7 +204,7 @@
             self.inner_run_cgi()
         except client.NotFound:
             self.send_error(404, self.path)
-        except client.Unauthorised, message:
+        except client.Unauthorised as message:
             self.send_error(403, '%s (%s)'%(self.path, message))
         except:
             exc, val, tb = sys.exc_info()
@@ -677,7 +677,7 @@
             if self["SSL"]:
                 kwargs['ssl_pem'] = self["PEM"]
             httpd = server_class(*args, **kwargs)
-        except socket.error, e:
+        except socket.error as e:
             if e[0] == errno.EADDRINUSE:
                 raise socket.error, \
                     _("Unable to bind to port %s, port already in use.") \
@@ -880,7 +880,7 @@
     try:
         (optlist, args) = config.getopt(sys.argv[1:],
             short_options, ("help", "version", "save-config",))
-    except (getopt.GetoptError, configuration.ConfigurationError), e:
+    except (getopt.GetoptError, configuration.ConfigurationError) as e:
         usage(str(e))
         return
 

Roundup Issue Tracker: http://roundup-tracker.org/