- don't care what 'type' attribute here
authorMark Huang <mlhuang@cs.princeton.edu>
Thu, 16 Nov 2006 16:16:48 +0000 (16:16 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Thu, 16 Nov 2006 16:16:48 +0000 (16:16 +0000)
api.py

diff --git a/api.py b/api.py
index 6484f48..4a64c3d 100644 (file)
--- a/api.py
+++ b/api.py
@@ -132,7 +132,7 @@ class APIRequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
             if method_name not in ('Help', 'Ticket'):
                 target_name = args[0]
                 target_rec = database.db.get(target_name)
-                if not (target_rec and target_rec['type'].startswith('sliver.')): raise xmlrpclib.Fault(102, 'Invalid argument: the first argument must be a sliver name.')
+                if not target_rec: raise xmlrpclib.Fault(102, 'Invalid argument: the first argument must be a sliver name.')
                 if not (caller_name in (args[0], 'root') or (caller_name, method_name) in target_rec['delegations']): raise xmlrpclib.Fault(108, 'Permission denied.')
                 result = method(target_rec, *args[1:])
             else: result = method(*args)