diff options
author | Rob Austein <sra@hactrn.net> | 2011-10-05 17:45:34 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2011-10-05 17:45:34 +0000 |
commit | f7c79af8743b7142e438e5db0af960cf91938b23 (patch) | |
tree | ce7c8521f681db0d45800f0231c0de596b27499a /rpkid/portal-gui/scripts/rpkigui-response.py | |
parent | 72e42a6508ff19a315a0257dda4a710bc195dffa (diff) |
Stop abusing RuntimeError. This closes #52.
svn path=/rpkid/portal-gui/scripts/load_csv.py; revision=4015
Diffstat (limited to 'rpkid/portal-gui/scripts/rpkigui-response.py')
-rwxr-xr-x | rpkid/portal-gui/scripts/rpkigui-response.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rpkid/portal-gui/scripts/rpkigui-response.py b/rpkid/portal-gui/scripts/rpkigui-response.py index eb2ee4d0..9b150c51 100755 --- a/rpkid/portal-gui/scripts/rpkigui-response.py +++ b/rpkid/portal-gui/scripts/rpkigui-response.py @@ -44,9 +44,14 @@ if len(sys.argv) < 4: sys.exit(0) +class InvalidResponseType(Exception): + """ + Invalid response type. + """ + request_type = sys.argv[2] if not request_type in ('parent', 'repository'): - raise RuntimeError, 'invalid response type: %s' % request_type + raise InvalidResponseType, 'invalid response type: %s' % request_type # make sure apache process can manipulate the outbox! os.setuid(pwd.getpwnam(settings.WEB_USER)[2]) |