[or-cvs] r17715: {updater} packageLen was meant to be a name-to-length dictionary, not (updater/trunk/lib/thandy)

nickm at seul.org nickm at seul.org
Sun Dec 21 17:25:04 UTC 2008


Author: nickm
Date: 2008-12-21 12:25:03 -0500 (Sun, 21 Dec 2008)
New Revision: 17715

Modified:
   updater/trunk/lib/thandy/SignerCLI.py
Log:
packageLen was meant to be a name-to-length dictionary, not an int.

Modified: updater/trunk/lib/thandy/SignerCLI.py
===================================================================
--- updater/trunk/lib/thandy/SignerCLI.py	2008-12-21 09:00:32 UTC (rev 17714)
+++ updater/trunk/lib/thandy/SignerCLI.py	2008-12-21 17:25:03 UTC (rev 17715)
@@ -98,11 +98,12 @@
         f = open(pkgFile, 'r')
         p = json.load(f)
         f.close()
-        packageLen = os.stat(pkgFile).st_size
+        length = os.stat(pkgFile).st_size
         _, r, _ = thandy.formats.checkSignedObj(p)
         if r != 'package':
             print pkgFile, "was not a package"
         packages[p['signed']['name']] = p['signed']
+        packageLen[p['signed']['name'] = length
 
     bundleObj = thandy.formats.makeBundleObj(configFile, packages.__getitem__,
                                              packageLen.__getitem__)



More information about the tor-commits mailing list