Changeset 1154 for trunk


Ignore:
Timestamp:
Oct 20, 2008, 1:43:09 PM (15 years ago)
Author:
broder
Message:

If the ACL for a locker isn't accessible, assume it's empty (closes #82)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/getafsgroups.py

    r413 r1154  
    4949
    5050def getLockerAcl(locker):
    51     p = subprocess.Popen(["fs", "listacl", getLockerPath(locker)],
    52                          stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    53     if p.wait():
    54         raise AfsProcessError(p.stderr.read())
     51    try:
     52        p = subprocess.Popen(["fs", "listacl", getLockerPath(locker)],
     53                             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     54        if p.wait():
     55            raise AfsProcessError(p.stderr.read())
     56    except AfsProcessError, e:
     57        if e.message.startswith("fs: You don't have the required access rights on"):
     58            return []
     59        raise
    5560    lines = p.stdout.readlines()
    5661    values = []
Note: See TracChangeset for help on using the changeset viewer.