[or-cvs] r17055: {weather} Stop printing the assertion error into the logs. Rather, giv (weather/trunk)

ioerror at seul.org ioerror at seul.org
Thu Oct 9 07:11:50 UTC 2008


Author: ioerror
Date: 2008-10-09 03:11:50 -0400 (Thu, 09 Oct 2008)
New Revision: 17055

Modified:
   weather/trunk/poll.py
Log:
Stop printing the assertion error into the logs. Rather, give a real message for the error and fail quietly.


Modified: weather/trunk/poll.py
===================================================================
--- weather/trunk/poll.py	2008-10-09 06:26:40 UTC (rev 17054)
+++ weather/trunk/poll.py	2008-10-09 07:11:50 UTC (rev 17055)
@@ -190,16 +190,19 @@
       ex1,ex2,ex3 = sys.exc_info()
       if self.internet_looks_okay():
         # But we can ping the net.  That's bad.
-        reason = print_exception(ex1,ex2,ex3)
+        # This doesn't work as you might expect, it returned None
+        #reason = print_exception(ex1,ex2,ex3)
+        reason = "Unable to ping node"
         if (debug):
           print "logging a strike against node", node, "because of:"
           print reason
         self.strike_against(node, reason)
       else:
-        print "I would have concluded that tor node", node, "was down;"
-        print "The problem looked like this:"
-        print print_exception(ex1,ex2,ex3)
-        print "But I couldn't ping %s!" % (self.ping_failure)
+        if (debug):
+          print "I would have concluded that tor node", node, "was down;"
+          print "The problem looked like this:"
+          print print_exception(ex1,ex2,ex3)
+          print "But I couldn't ping %s!" % (self.ping_failure)
  
   good_ping = re.compile("0% packet loss")
 



More information about the tor-commits mailing list