summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bf0c8d9)
raw | patch | inline | side by side (parent: bf0c8d9)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sat, 15 Dec 2001 23:47:47 +0000 (23:47 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sat, 15 Dec 2001 23:47:47 +0000 (23:47 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@469 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/hyperdb.py | patch | blob | history |
diff --git a/roundup/hyperdb.py b/roundup/hyperdb.py
index 5310db79895149e8c3f4c8c4ecaeef5da429b29f..b44e399068a4b3c3faf5dce2b8da46c33615d085 100644 (file)
--- a/roundup/hyperdb.py
+++ b/roundup/hyperdb.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: hyperdb.py,v 1.40 2001-12-14 23:42:57 richard Exp $
+# $Id: hyperdb.py,v 1.41 2001-12-15 23:47:47 richard Exp $
__doc__ = """
Hyperdatabase implementation, especially field types.
if not num_re.match(value):
try:
value = self.db.classes[link_class].lookup(value)
- except:
+ except (TypeError, KeyError):
raise IndexError, 'new property "%s": %s not a %s'%(
key, value, link_class)
elif not self.db.hasnode(link_class, value):
if not num_re.match(entry):
try:
entry = self.db.classes[link_class].lookup(entry)
- except:
+ except (TypeError, KeyError):
raise IndexError, 'new property "%s": %s not a %s'%(
key, entry, self.properties[key].classname)
l.append(entry)
if not num_re.match(value):
try:
value = self.db.classes[link_class].lookup(value)
- except:
+ except (TypeError, KeyError):
raise IndexError, 'new property "%s": %s not a %s'%(
key, value, self.properties[key].classname)
if not num_re.match(entry):
try:
entry = self.db.classes[link_class].lookup(entry)
- except:
+ except (TypeError, KeyError):
raise IndexError, 'new property "%s": %s not a %s'%(
key, entry, self.properties[key].classname)
l.append(entry)
elif not num_re.match(entry):
try:
entry = link_class.lookup(entry)
- except:
+ except (TypeError,KeyError):
raise ValueError, 'property "%s": %s not a %s'%(
k, entry, self.properties[k].classname)
u.append(entry)
if not num_re.match(entry):
try:
entry = link_class.lookup(entry)
- except:
+ except (TypeError,KeyError):
raise ValueError, 'new property "%s": %s not a %s'%(
k, entry, self.properties[k].classname)
u.append(entry)
if (isinstance(propclass, String) or
isinstance(propclass, Date)):
# it might be a string that's really an integer
- try:
- av = int(av)
- bv = int(bv)
- except:
- pass
+ av = int(av)
+ bv = int(bv)
if dir == '+':
r = cmp(av, bv)
if r != 0: return r
#
# $Log: not supported by cvs2svn $
+# Revision 1.40 2001/12/14 23:42:57 richard
+# yuck, a gdbm instance tests false :(
+# I've left the debugging code in - it should be removed one day if we're ever
+# _really_ anal about performace :)
+#
# Revision 1.39 2001/12/02 05:06:16 richard
# . We now use weakrefs in the Classes to keep the database reference, so
# the close() method on the database is no longer needed.