From: Evan Broder Date: Sun, 15 Mar 2009 18:44:42 +0000 (-0400) Subject: Don't ignore lists overflowing the display limit. X-Git-Tag: 0.1.0~65 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/python-afs.git/commitdiff_plain/9532a77c8856aab6060a79f152c84551a90f0172 Don't ignore lists overflowing the display limit. Signed-off-by: Evan Broder --- diff --git a/afs/_pts.pyx b/afs/_pts.pyx index cce9256..6b6de79 100644 --- a/afs/_pts.pyx +++ b/afs/_pts.pyx @@ -32,6 +32,7 @@ cdef import from "afs/ptuser.h": cdef import from "afs/pterror.h": enum: PRNOENT + PRTOOMANY void initialize_PT_error_table() @@ -264,12 +265,15 @@ cdef class PTS: 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