summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7afe2de)
Signed-off-by: Evan Broder <broder@mit.edu>
ubik_ClientDestroy(self.client)
rx_Finalize()
ubik_ClientDestroy(self.client)
rx_Finalize()
+ def NameOrId(self, ident):
+ """
+ Given an identifier, convert it to a PTS ID by looking up the
+ name if it's a string, or otherwise just converting it to an
+ integer.
+ """
+ if isinstance(ident, (str, unicode)):
+ return self.NameToId(ident)
+ else:
+ return int(ident)
+
def NameToId(self, name):
"""
Converts a user or group to an AFS ID.
def NameToId(self, name):
"""
Converts a user or group to an AFS ID.