Mercurial > p > roundup > code
diff roundup/xmlrpc.py @ 3841:c31da624ae3b
fix RoundupRequest:
the database must not be left open when an error is raised from the
constructor
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Wed, 04 Apr 2007 07:51:43 +0000 |
| parents | 9596a516d78c |
| children | 3c3077582c16 |
line wrap: on
line diff
--- a/roundup/xmlrpc.py Wed Apr 04 05:11:23 2007 +0000 +++ b/roundup/xmlrpc.py Wed Apr 04 07:51:43 2007 +0000 @@ -51,9 +51,11 @@ try: userid = self.db.user.lookup(username) except KeyError: # No such user + self.db.close() raise Unauthorised, 'Invalid user.' stored = self.db.user.get(userid, 'password') if stored != password: # Wrong password + self.db.close() raise Unauthorised, 'Invalid user.' self.db.setCurrentUser(username)
