From 5d5ce532e4cd87f45d5d8a8297333eac35ffe249 Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 3 Sep 2002 05:46:21 +0000 Subject: [PATCH] handle disappearing users for journaltags git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1040 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/backends/back_anydbm.py | 11 +++++++++-- roundup/backends/back_gadfly.py | 10 ++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/roundup/backends/back_anydbm.py b/roundup/backends/back_anydbm.py index 97d6b89..f1f70fc 100644 --- a/roundup/backends/back_anydbm.py +++ b/roundup/backends/back_anydbm.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: back_anydbm.py,v 1.67 2002-09-03 02:53:53 richard Exp $ +#$Id: back_anydbm.py,v 1.68 2002-09-03 05:46:20 richard Exp $ ''' This module defines a backend that saves the hyperdatabase in a database chosen by anydbm. It is guaranteed to always be available in python @@ -979,7 +979,11 @@ class Class(hyperdb.Class): name = self.db.getjournal(self.classname, nodeid)[0][2] else: return None - return self.db.user.lookup(name) + try: + return self.db.user.lookup(name) + except KeyError: + # the journaltag user doesn't exist any more + return None # get the property (raises KeyErorr if invalid) prop = self.properties[propname] @@ -1905,6 +1909,9 @@ class IssueClass(Class, roundupdb.IssueClass): # #$Log: not supported by cvs2svn $ +#Revision 1.67 2002/09/03 02:53:53 richard +#Fixed nasty bug that was preventing changes to multilinks going through. +# #Revision 1.66 2002/09/01 04:32:30 richard #. Lots of cleanup in the classic html (stylesheet, search page, index page, ...) #. Reinstated searching, but not query saving yet diff --git a/roundup/backends/back_gadfly.py b/roundup/backends/back_gadfly.py index 0c0e89c..8bfc257 100644 --- a/roundup/backends/back_gadfly.py +++ b/roundup/backends/back_gadfly.py @@ -1,4 +1,4 @@ -# $Id: back_gadfly.py,v 1.8 2002-09-03 02:53:53 richard Exp $ +# $Id: back_gadfly.py,v 1.9 2002-09-03 05:46:21 richard Exp $ __doc__ = ''' About Gadfly ============ @@ -1036,7 +1036,10 @@ class Class(hyperdb.Class): name = self.db.getjournal(self.classname, nodeid)[0][2] else: return None - return self.db.user.lookup(name) + try: + return self.db.user.lookup(name) + except KeyError: + # the journaltag user doesn't exist any more # get the property (raises KeyErorr if invalid) prop = self.properties[propname] @@ -1754,6 +1757,9 @@ class IssueClass(Class, roundupdb.IssueClass): # # $Log: not supported by cvs2svn $ +# Revision 1.8 2002/09/03 02:53:53 richard +# Fixed nasty bug that was preventing changes to multilinks going through. +# # Revision 1.7 2002/09/01 04:32:30 richard # . Lots of cleanup in the classic html (stylesheet, search page, index page, ...) # . Reinstated searching, but not query saving yet -- 2.30.2