Code

applied patch 688595
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 26 Feb 2003 04:55:57 +0000 (04:55 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 26 Feb 2003 04:55:57 +0000 (04:55 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1547 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/hyperdb.py

index 52c9accf7659747e30f0608cb2f98aabf3a2d94c..f78be2502611f2b7af025fb3efdfd46e7973ea1e 100644 (file)
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: hyperdb.py,v 1.85 2003-02-18 01:57:38 richard Exp $
+# $Id: hyperdb.py,v 1.86 2003-02-26 04:55:57 richard Exp $
 
 """
 Hyperdatabase implementation, especially field types.
@@ -588,6 +588,11 @@ class Node:
         return l
     def has_key(self, name):
         return self.cl.getprops().has_key(name)
+    def get(self, name, default=None): 
+        if self.has_key(name):
+            return self[name]
+        else:
+            return default
     def __getattr__(self, name):
         if self.__dict__.has_key(name):
             return self.__dict__[name]