From 9532a77c8856aab6060a79f152c84551a90f0172 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sun, 15 Mar 2009 14:44:42 -0400 Subject: [PATCH] Don't ignore lists overflowing the display limit. Signed-off-by: Evan Broder --- afs/_pts.pyx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 -- 1.7.9.5