diff mercurial/hgweb/server.py @ 26587:56b2bcea2529

error: get Abort from 'error' instead of 'util' The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be confused about that and gives all the credit to 'util' instead of the hardworking 'error'. In a spirit of equity, we break the cycle of injustice and give back to 'error' the respect it deserves. And screw that 'util' poser. For great justice.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 08 Oct 2015 12:55:45 -0700
parents 04af43009c8b
children d962e955da08
line wrap: on
line diff
--- a/mercurial/hgweb/server.py	Mon Oct 05 22:49:24 2015 -0700
+++ b/mercurial/hgweb/server.py	Thu Oct 08 12:55:45 2015 -0700
@@ -208,7 +208,7 @@
             import OpenSSL
             OpenSSL.SSL.Context
         except ImportError:
-            raise util.Abort(_("SSL support is unavailable"))
+            raise error.Abort(_("SSL support is unavailable"))
         ctx = OpenSSL.SSL.Context(OpenSSL.SSL.TLSv1_METHOD)
         ctx.use_privatekey_file(ssl_cert)
         ctx.use_certificate_file(ssl_cert)
@@ -249,7 +249,7 @@
             import ssl
             ssl.wrap_socket
         except ImportError:
-            raise util.Abort(_("SSL support is unavailable"))
+            raise error.Abort(_("SSL support is unavailable"))
         httpserver.socket = ssl.wrap_socket(
             httpserver.socket, server_side=True,
             certfile=ssl_cert, ssl_version=ssl.PROTOCOL_TLSv1)
@@ -345,5 +345,5 @@
     try:
         return cls(ui, app, (address, port), handler)
     except socket.error as inst:
-        raise util.Abort(_("cannot start server at '%s:%d': %s")
+        raise error.Abort(_("cannot start server at '%s:%d': %s")
                          % (address, port, inst.args[1]))