[Pkg-privacy-commits] [obfsproxy] 52/353: Better exception handling

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:01:38 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 8bf32e62ca0b7836979800d22c1a56283350adcb
Author: Brandon Wiley <brandon at blanu.net>
Date:   Fri Sep 7 13:19:26 2012 -0500

    Better exception handling
---
 src/obfsproxy/framework/proxy.py | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/obfsproxy/framework/proxy.py b/src/obfsproxy/framework/proxy.py
index 2a9f70c..449604f 100644
--- a/src/obfsproxy/framework/proxy.py
+++ b/src/obfsproxy/framework/proxy.py
@@ -44,16 +44,19 @@ class ProxyHandler:
 
         logging.error('connection')
         logging.error('connecting %s:%d' % (self.addr, self.port))
-        logging.error('types: %s:%s' % (str(type(self.addr)), str(type(self.port))))
         client = Client()
 
-	try:
-	    yield client.connect(self.addr, self.port)
-	except Exception as e:
-	    logging.error('Error connecting to destination')
+        try:
+            yield client.connect(self.addr, self.port)
+        except Exception as e:
+            logging.error('Error connecting to destination')
             return
 
-        self.pump = Pump(conn, client, self.transport)
-        self.pump.run()
+        try:
+            self.pump = Pump(conn, client, self.transport)
+            yield self.pump.run()
+        except Exception as e:
+            logging.error('Exception pumping')
+            logging.error(e)
 
 

-- 
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