Ignore:
Timestamp:
Apr 21, 2008, 5:29:42 PM (17 years ago)
Author:
ecprice
Message:

Nicer error message on admin not being a group.

File:
1 edited

Legend:

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

    r413 r431  
    163163            return admin
    164164    except getafsgroups.AfsProcessError, e:
    165         raise InvalidInput('administrator', admin, str(e))
     165        errmsg = str(e)
     166        if errmsg.startswith("pts: User or group doesn't exist"):
     167            errmsg = 'The group "%s" does not exist.' % admin
     168        raise InvalidInput('administrator', admin, errmsg)
    166169    #XXX Should we require that user is in the admin group?
    167170    return admin
Note: See TracChangeset for help on using the changeset viewer.