From: Eric Price Date: Mon, 14 Apr 2008 03:59:50 +0000 (-0400) Subject: Rename MyException to something reasonable. X-Git-Tag: sipb-xen-www/3.4~55 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/c1698793a8a1d05b16c2dc362a7c28b2af0b69d3 Rename MyException to something reasonable. svn path=/trunk/packages/sipb-xen-www/; revision=409 --- diff --git a/code/getafsgroups.py b/code/getafsgroups.py index 9e0f31f..e71ede4 100644 --- a/code/getafsgroups.py +++ b/code/getafsgroups.py @@ -25,7 +25,7 @@ from webcommon import InvalidInput # return True # return False -class MyException(Exception): +class AfsProcessError(Exception): pass def getAfsGroupMembers(group, cell): @@ -50,14 +50,14 @@ def getCell(locker): p = subprocess.Popen(["fs", "whichcell", getLockerPath(locker)], stdout=subprocess.PIPE, stderr=subprocess.PIPE) if p.wait(): - raise MyException(p.stderr.read()) + raise AfsProcessError(p.stderr.read()) return p.stdout.read().split()[-1][1:-1] def getLockerAcl(locker): p = subprocess.Popen(["fs", "listacl", getLockerPath(locker)], stdout=subprocess.PIPE, stderr=subprocess.PIPE) if p.wait(): - raise MyException(p.stderr.read()) + raise AfsProcessError(p.stderr.read()) lines = p.stdout.readlines() values = [] for line in lines[1:]: @@ -78,7 +78,7 @@ def notLockerOwner(user, locker): try: cell = getCell(locker) values = getLockerAcl(locker) - except MyException, e: + except AfsProcessError, e: return str(e) for entry in values: