[Pkg-privacy-commits] [obfsproxy] 239/353: Improve the error message if we can't set up a listener.

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:02:04 UTC 2015


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

infinity0 pushed a commit to branch master
in repository obfsproxy.

commit 2e88b52b11edf850c6f7989a0aed39fa20137c14
Author: George Kadianakis <desnacked at riseup.net>
Date:   Thu Feb 13 18:01:02 2014 +0000

    Improve the error message if we can't set up a listener.
---
 obfsproxy/managed/client.py | 8 +++++---
 obfsproxy/managed/server.py | 8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/obfsproxy/managed/client.py b/obfsproxy/managed/client.py
index 72eccec..8169c40 100644
--- a/obfsproxy/managed/client.py
+++ b/obfsproxy/managed/client.py
@@ -47,9 +47,11 @@ def do_managed_client():
             log.warning("Could not find transport '%s'" % transport)
             ptclient.reportMethodError(transport, "Could not find transport.")
             continue
-        except error.CannotListenError:
-            log.warning("Could not set up listener for '%s'." % transport)
-            ptclient.reportMethodError(transport, "Could not set up listener.")
+        except error.CannotListenError, e:
+            error_msg = "Could not set up listener (%s:%s) for '%s' (%s)." % \
+                        (e.interface, e.port, transport, e.socketError[1])
+            log.warning(error_msg)
+            ptclient.reportMethodError(transport, error_msg)
             continue
 
         should_start_event_loop = True
diff --git a/obfsproxy/managed/server.py b/obfsproxy/managed/server.py
index 5152a6d..eeca339 100644
--- a/obfsproxy/managed/server.py
+++ b/obfsproxy/managed/server.py
@@ -72,9 +72,11 @@ def do_managed_server():
             log.warning("Could not find transport '%s'" % transport)
             ptserver.reportMethodError(transport, "Could not find transport.")
             continue
-        except error.CannotListenError:
-            log.warning("Could not set up listener for '%s'." % transport)
-            ptserver.reportMethodError(transport, "Could not set up listener.")
+        except error.CannotListenError, e:
+            error_msg = "Could not set up listener (%s:%s) for '%s' (%s)." % \
+                        (e.interface, e.port, transport, e.socketError[1])
+            log.warning(error_msg)
+            ptserver.reportMethodError(transport, error_msg)
             continue
 
         should_start_event_loop = True

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



More information about the Pkg-privacy-commits mailing list