[Pkg-privacy-commits] [pyptlib] 60/136: Fix some cases where we forgot to emit ENV-ERROR.

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:25:08 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository pyptlib.

commit d9eb0789e7f188c8688adbd30b80780da9862b96
Author: George Kadianakis <desnacked at riseup.net>
Date:   Thu Dec 6 20:28:58 2012 +0200

    Fix some cases where we forgot to emit ENV-ERROR.
---
 pyptlib/server_config.py | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/pyptlib/server_config.py b/pyptlib/server_config.py
index 06c4fe1..4ceb3f4 100644
--- a/pyptlib/server_config.py
+++ b/pyptlib/server_config.py
@@ -40,9 +40,13 @@ class ServerConfig(config.Config):
         # Check that either both Extended ORPort and the Extended
         # ORPort Authentication Cookie are present, or neither.
         if self.extendedORPort and not self.authCookieFile:
-            raise config.EnvError("Extended ORPort address provided, but no cookie file.")
+            err = "Extended ORPort address provided, but no cookie file."
+            self.writeEnvError(err)
+            raise config.EnvError(err)
         elif self.authCookieFile and not self.extendedORPort:
-            raise config.EnvError("Extended ORPort Authentication cookie file provided, but no Extended ORPort address.")
+            err = "Extended ORPort Authentication cookie file provided, but no Extended ORPort address."
+            self.writeEnvError(err)
+            raise config.EnvError(err)
 
         # Get ORPort.
         self.ORPort = self.get_addrport('TOR_PT_ORPORT')
@@ -62,7 +66,9 @@ class ServerConfig(config.Config):
             self.transports.remove('*')
 
         if sorted(self.transports) != sorted(self.serverBindAddr.keys()):
-            raise config.EnvError("Can't match transports with bind addresses (%s, %s)" % (self.transports, self.serverBindAddr.keys()))
+            err = "Can't match transports with bind addresses (%s, %s)" % (self.transports, self.serverBindAddr.keys())
+            self.writeEnvError(err)
+            raise config.EnvError(err)
 
     def getExtendedORPort(self):
         """

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/pyptlib.git



More information about the Pkg-privacy-commits mailing list