cdef import from "afs/pterror.h":
enum:
PRNOENT
+ PRTOOMANY
void initialize_PT_error_table()
alist.prlist_val = NULL
code = ubik_PR_ListElements(self.client, 0, gid, &alist, &over)
- if code != 0:
- raise Exception("Failed to get group membership: %s" % afs_error_message(code))
- for i in range(alist.prlist_len):
- members.append(alist.prlist_val[i])
if alist.prlist_val is not NULL:
+ for i in range(alist.prlist_len):
+ members.append(alist.prlist_val[i])
free(alist.prlist_val)
+ if over:
+ code = PRTOOMANY
+ if code != 0:
+ raise Exception("Failed to get group membership: %s" % afs_error_message(code))
+
return members