[Pkg-privacy-commits] [obfsproxy] 31/353: Better logging of exceptions

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:01:35 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 6acaf2253fdcfc10cb0c3e8d5a6a7a837d99c239
Author: Brandon Wiley <brandon at blanu.net>
Date:   Wed Aug 8 14:20:04 2012 -0500

    Better logging of exceptions
---
 src/cli.py | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/cli.py b/src/cli.py
index 25d1edf..0ce903d 100644
--- a/src/cli.py
+++ b/src/cli.py
@@ -5,7 +5,7 @@ import os
 import sys
 import logging
 
-logging.basicConfig(filename='/home/brandon/py-obfsproxy/pyobfslog.txt'
+logging.basicConfig(filename='/home/blanu/py-obfsproxy/pyobfslog.txt'
                     , loglevel=logging.DEBUG)
 logging.error('py-obfsproxy CLI loaded')
 logging.error('argv: ' + str(sys.argv))
@@ -70,17 +70,19 @@ if __name__ == '__main__':
 
     logging.error('py-obfsproxy CLI loaded')
 
-    daemon = None
-    if args.managed:
-        if checkClientMode():
-            logging.error('client')
-            daemon = ManagedClient()
+    try:
+        daemon = None
+        if args.managed:
+            if checkClientMode():
+                logging.error('client')
+                daemon = ManagedClient()
+            else:
+                logging.error('server')
+                daemon = ManagedServer()
         else:
-            logging.error('server')
-            daemon = ManagedServer()
-    else:
-        logging.error('Unsupported mode. Only managed mode is available at the moment.'
-                      )
+            logging.error('Unsupported mode. Only managed mode is available at the moment.')
+    except:
+      logging.exception('Exception launching daemon')
 
 #        if dest:
 #            daemon = ExternalClient()

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