X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/d7764c68cddf71645439f295c31532e528231051..c5de4def3ee8581b5fdafe9bc34f1520e4bc8252:/code/cache_acls.py diff --git a/code/cache_acls.py b/code/cache_acls.py index 1a23587..fe69815 100644 --- a/code/cache_acls.py +++ b/code/cache_acls.py @@ -10,8 +10,12 @@ def expandLocker(name): groups = getafsgroups.getLockerAcl(name) except getafsgroups.AfsProcessError, e: if e.message.startswith("fs: You don't have the required access rights on"): - groups = [] - raise + return [] + elif e.message.endswith("doesn't exist\n"): + # presumably deactivated + return [] + else: + raise cell = getafsgroups.getCell(name) ans = set() for group in groups: @@ -42,7 +46,8 @@ def expandName(name): def accessList(m): people = set() people.update(expandLocker(m.owner)) - people.update(expandName(m.administrator)) + if m.administrator is not None: + people.update(expandName(m.administrator)) return people def refreshMachine(m):