Skip to content

Commit

Permalink
Fix dereference of non-existing property e.message. Also trying to ge…
Browse files Browse the repository at this point in the history
…t output on badrequest - not working yet - something changed in latest web.py
  • Loading branch information
harryf committed Mar 6, 2009
1 parent 1587232 commit d988a42
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions urldammit.py
Expand Up @@ -176,8 +176,7 @@ def _store(self, uri, i):
return False

if not self.validstatus.match(status):
self._badrequest("Bad value for status: '%s'" % status)
return False
return self._badrequest("Bad value for status: '%s'" % status)

tags = unpack_tags(getattr(i, 'tags', []))
pairs = unpack_pairs(getattr(i, 'pairs', {}))
Expand All @@ -202,8 +201,7 @@ def _store(self, uri, i):
return

except URIError, e:
self._badrequest(e.message)
return False
return self._badrequest(e)

def _delete(self, id):
known = get_known()
Expand Down

0 comments on commit d988a42

Please sign in to comment.