[tor-bugs] #10609 [Torflow]: aggregate.py unhappy with input data

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Jan 25 15:37:15 UTC 2015


#10609: aggregate.py unhappy with input data
-------------------------+--------------------
     Reporter:  ln5      |      Owner:  aagbsn
         Type:  defect   |     Status:  new
     Priority:  normal   |  Milestone:
    Component:  Torflow  |    Version:
   Resolution:           |   Keywords:
Actual Points:           |  Parent ID:
       Points:           |
-------------------------+--------------------

Comment (by micah):

 I just added an exception to the part of the code to print out which file
 it is:

 {{{
   for da in argv[1:-1]:
     # First, create a list of the most recent files in the
     # scan dirs that are recent enough
     for root, dirs, f in os.walk(da):
       for ds in dirs:
         if re.match("^scanner.[\d+]$", ds):
           newest_timestamp = 0
           for sr, sd, files in os.walk(da+"/"+ds+"/scan-data"):
             for f in files:
               if re.search("^bws-[\S]+-done-", f):
                 try:
                   fp = file(sr+"/"+f, "r")
                   slicenum = sr+"/"+fp.readline()
                   timestamp = float(fp.readline())
                   fp.close()
                 except ValueError:
                   print("ValueError on file: "+f)
 }}}

 and then I ran it, and it said:

 {{{
 ValueError on file: bws-41.4:42.1-done-2015-01-21-17:03:13
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10609#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list