must specify create when creating keys with Keypair()
authorTony Mack <tmack@cs.princeton.edu>
Tue, 16 Jun 2009 17:08:11 +0000 (17:08 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Tue, 16 Jun 2009 17:08:11 +0000 (17:08 +0000)
geni/methods/register.py

index ec44b12..1c095ad 100644 (file)
@@ -43,10 +43,10 @@ class register(Method):
         # make sure record has a gid
         if 'gid' not in record:
             uuid = create_uuid()
-            pkey = Keypair()
+            pkey = Keypair(create=True)
             if 'keys' in record and record['keys']:
                 pkey = convert_public_key(record['keys'][0])
-                
+            
             gid_object = self.api.auth.hierarchy.create_gid(name, uuid, pkey)
             gid = gid_object.save_to_string(save_parents=True)
             record['gid'] = gid