Skip to content

Commit 5033012

Browse files
author
Richard Jones
committed
handle disappearing users for journaltags
1 parent 6ae75d0 commit 5033012

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

roundup/backends/back_anydbm.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: back_anydbm.py,v 1.67 2002-09-03 02:53:53 richard Exp $
18+
#$Id: back_anydbm.py,v 1.68 2002-09-03 05:46:20 richard Exp $
1919
'''
2020
This module defines a backend that saves the hyperdatabase in a database
2121
chosen by anydbm. It is guaranteed to always be available in python
@@ -979,7 +979,11 @@ def get(self, nodeid, propname, default=_marker, cache=1):
979979
name = self.db.getjournal(self.classname, nodeid)[0][2]
980980
else:
981981
return None
982-
return self.db.user.lookup(name)
982+
try:
983+
return self.db.user.lookup(name)
984+
except KeyError:
985+
# the journaltag user doesn't exist any more
986+
return None
983987

984988
# get the property (raises KeyErorr if invalid)
985989
prop = self.properties[propname]
@@ -1905,6 +1909,9 @@ def __init__(self, db, classname, **properties):
19051909

19061910
#
19071911
#$Log: not supported by cvs2svn $
1912+
#Revision 1.67 2002/09/03 02:53:53 richard
1913+
#Fixed nasty bug that was preventing changes to multilinks going through.
1914+
#
19081915
#Revision 1.66 2002/09/01 04:32:30 richard
19091916
#. Lots of cleanup in the classic html (stylesheet, search page, index page, ...)
19101917
#. Reinstated searching, but not query saving yet

roundup/backends/back_gadfly.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: back_gadfly.py,v 1.8 2002-09-03 02:53:53 richard Exp $
1+
# $Id: back_gadfly.py,v 1.9 2002-09-03 05:46:21 richard Exp $
22
__doc__ = '''
33
About Gadfly
44
============
@@ -1036,7 +1036,10 @@ def get(self, nodeid, propname, default=_marker, cache=1):
10361036
name = self.db.getjournal(self.classname, nodeid)[0][2]
10371037
else:
10381038
return None
1039-
return self.db.user.lookup(name)
1039+
try:
1040+
return self.db.user.lookup(name)
1041+
except KeyError:
1042+
# the journaltag user doesn't exist any more
10401043

10411044
# get the property (raises KeyErorr if invalid)
10421045
prop = self.properties[propname]
@@ -1754,6 +1757,9 @@ def __init__(self, db, classname, **properties):
17541757

17551758
#
17561759
# $Log: not supported by cvs2svn $
1760+
# Revision 1.8 2002/09/03 02:53:53 richard
1761+
# Fixed nasty bug that was preventing changes to multilinks going through.
1762+
#
17571763
# Revision 1.7 2002/09/01 04:32:30 richard
17581764
# . Lots of cleanup in the classic html (stylesheet, search page, index page, ...)
17591765
# . Reinstated searching, but not query saving yet

0 commit comments

Comments
 (0)