summaryrefslogtreecommitdiff
path: root/lib/thandy/SignerCLI.py
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-10-14 20:04:10 +0000
committerNick Mathewson <nickm@torproject.org>2008-10-14 20:04:10 +0000
commitfddafd73158e34300c4459d1e10154672cda81d3 (patch)
tree1c5b9f75e7b5a056a813704d0798800ddcd845b6 /lib/thandy/SignerCLI.py
parent1370be1a701bb5e90eb219d21e0019e9bf4f975e (diff)
Usability fixes and cleanups
git-svn-id: file:///home/or/svnrepo/updater/trunk@17096 55e972cd-5a19-0410-ae62-a4d7a52db4cd
Diffstat (limited to 'lib/thandy/SignerCLI.py')
-rw-r--r--lib/thandy/SignerCLI.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/thandy/SignerCLI.py b/lib/thandy/SignerCLI.py
index d3af5fb..d002565 100644
--- a/lib/thandy/SignerCLI.py
+++ b/lib/thandy/SignerCLI.py
@@ -98,13 +98,9 @@ def makebundle(args):
_, r, _ = thandy.formats.checkSignedObj(p)
if r != 'package':
print pkgFile, "was not a package"
- packages[p['signed']['location']] = p
+ packages[p['signed']['name']] = p['signed']
- def getHash(path):
- p = packages[path]
- return thandy.formats.getDigest(p['signed'])
-
- bundleObj = thandy.formats.makeBundleObj(configFile, getHash)
+ bundleObj = thandy.formats.makeBundleObj(configFile, packages.__getitem__)
signable = thandy.formats.makeSignable(bundleObj)
ks = getKeyStore()
@@ -224,7 +220,7 @@ def addrole(args):
r = args[1]
if r not in thandy.formats.ALL_ROLES:
print "Unrecognized role %r. Known roles are %s"%(
- r,", ".join(thandy.format.ALL_ROLES))
+ r,", ".join(thandy.formats.ALL_ROLES))
sys.exit(1)
p = args[2]
k.addRole(r, p)
@@ -239,7 +235,7 @@ def delrole(args):
r = args[1]
if r not in thandy.formats.ALL_ROLES:
print "Unrecognized role %r. Known roles are %s"%(
- r,", ".join(thandy.format.ALL_ROLES))
+ r,", ".join(thandy.formats.ALL_ROLES))
sys.exit(1)
p = args[2]