Opened 8 years ago

Closed 7 years ago

#8371 closed defect (fixed)

UnboundLocalError: local variable 'hdlr' referenced before assignment

Reported by: arma Owned by: aagbsn
Priority: Medium Milestone:
Component: Core Tor/Torflow Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


ERROR[Thu Feb 28 21:33:17 2013]:An unexpected error occured.
Traceback (most recent call last):
  File "", line 391, in <module>
    else: main(sys.argv)
  File "", line 313, in main
UnboundLocalError: local variable 'hdlr' referenced before assignment

Running Torflow caf001962.

Child Tickets

Change History (3)

comment:1 Changed 8 years ago by arma

I think this happens when it failed to connect to the Tor control port.

Which is a separate issue, but it probably shouldn't result in trying to do the hdlr attach anyway if things aren't initialized enough.

comment:2 Changed 8 years ago by aagbsn

I think this will do the trick:

diff --git a/NetworkScanners/BwAuthority/ b/NetworkScanners/BwAuthority/
index be9d5fe..5466e16 100755
--- a/NetworkScanners/BwAuthority/
+++ b/NetworkScanners/BwAuthority/
@@ -24,6 +24,7 @@ import sqlalchemy
 import sets
 import re
 import random
+from signal import SIGKILL
@@ -302,6 +303,7 @@ def main(argv):
     except Exception, e:
       plog("WARN", "Can't connect to Tor: "+str(e))
+      sys.exit(SIGKILL)
     if db_url:

comment:3 Changed 7 years ago by aagbsn

Resolution: fixed
Status: newclosed

looks like this was fixed in:

Note: See TracTickets for help on using tickets.