[or-cvs] r19889: {torctl} Change 1024 multiplier to 1000 for networkstatus sourced ban (torctl/trunk/python/TorCtl)

mikeperry at seul.org mikeperry at seul.org
Wed Jul 1 19:50:48 UTC 2009


Author: mikeperry
Date: 2009-07-01 15:50:47 -0400 (Wed, 01 Jul 2009)
New Revision: 19889

Modified:
   torctl/trunk/python/TorCtl/TorCtl.py
Log:

Change 1024 multiplier to 1000 for networkstatus sourced
bandwidths, as this is the New Kilobyte.



Modified: torctl/trunk/python/TorCtl/TorCtl.py
===================================================================
--- torctl/trunk/python/TorCtl/TorCtl.py	2009-07-01 16:06:39 UTC (rev 19888)
+++ torctl/trunk/python/TorCtl/TorCtl.py	2009-07-01 19:50:47 UTC (rev 19889)
@@ -943,7 +943,7 @@
     m = re.match(r"(\S+)\s(\S+)\s(\S+)\s(\S+\s\S+)\s(\S+)\s(\d+)\s(\d+)", nsline)    
     w = re.search(r"^w Bandwidth=(\d+)", nsline, re.M)
     if w:
-      nslist.append(NetworkStatus(*(m.groups()+(flags,)+(int(w.group(1))*1024,))))
+      nslist.append(NetworkStatus(*(m.groups()+(flags,)+(int(w.group(1))*1000,))))
     else:
       nslist.append(NetworkStatus(*(m.groups() + (flags,))))
   return nslist



More information about the tor-commits mailing list