no more __init__ created for now
[sfa.git] / geni / methods / get_ticket.py
index 2f53c37..e8495b7 100644 (file)
@@ -1,9 +1,11 @@
+### $Id$
+### $URL$
+
+from geni.trust.certificate import Keypair 
 from geni.util.faults import *
-from geni.util.excep import *
 from geni.util.method import Method
 from geni.util.parameter import Parameter, Mixed
 from geni.util.auth import Auth
-from geni.util.cert import Keypair 
 from geni.util.geniticket import *
 
 class get_ticket(Method):
@@ -34,7 +36,7 @@ class get_ticket(Method):
     returns = Parameter(str, "String represeneation of a ticket object")
     
     def call(self, cred, hrn, rspec):
-        self.api.auth.decode_authentication(cred, "getticket")
+        self.api.auth.check(cred, "getticket")
         self.api.auth.verify_object_belongs_to_me(hrn)
         self.api.auth.verify_object_permission(name)
 
@@ -47,7 +49,7 @@ class get_ticket(Method):
         auth_info = self.api.auth.get_auth_info(auth_hrn)
         record = None
         table = self.api.auth.get_auth_table(auth_hrn)
-        records = table.resolve('slice', hrn)
+        record = table.resolve('slice', hrn)
 
         object_gid = record.get_gid_object()
         new_ticket = Ticket(subject = object_gid.get_subject())