From d988a4288a0f0cc38b364c346ff4e549a5bef305 Mon Sep 17 00:00:00 2001 From: Harry Fuecks Date: Fri, 6 Mar 2009 13:08:39 +0100 Subject: [PATCH] Fix dereference of non-existing property e.message. Also trying to get output on badrequest - not working yet - something changed in latest web.py --- urldammit.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/urldammit.py b/urldammit.py index aab7a2a..414b2d7 100755 --- a/urldammit.py +++ b/urldammit.py @@ -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', {})) @@ -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()