comparison roundup/hyperdb.py @ 1470:9ccd69fbe33e

applied patch [SF#688595]
author Richard Jones <richard@users.sourceforge.net>
date Wed, 26 Feb 2003 04:55:57 +0000
parents b42fa71754c9
children 63aa7be52d2c
comparison
equal deleted inserted replaced
1469:79d8956de3f5 1470:9ccd69fbe33e
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: hyperdb.py,v 1.85 2003-02-18 01:57:38 richard Exp $ 18 # $Id: hyperdb.py,v 1.86 2003-02-26 04:55:57 richard Exp $
19 19
20 """ 20 """
21 Hyperdatabase implementation, especially field types. 21 Hyperdatabase implementation, especially field types.
22 """ 22 """
23 23
586 for name in self.cl.getprops(protected=protected).keys(): 586 for name in self.cl.getprops(protected=protected).keys():
587 l.append((name, self.cl.get(self.nodeid, name, cache=self.cache))) 587 l.append((name, self.cl.get(self.nodeid, name, cache=self.cache)))
588 return l 588 return l
589 def has_key(self, name): 589 def has_key(self, name):
590 return self.cl.getprops().has_key(name) 590 return self.cl.getprops().has_key(name)
591 def get(self, name, default=None):
592 if self.has_key(name):
593 return self[name]
594 else:
595 return default
591 def __getattr__(self, name): 596 def __getattr__(self, name):
592 if self.__dict__.has_key(name): 597 if self.__dict__.has_key(name):
593 return self.__dict__[name] 598 return self.__dict__[name]
594 try: 599 try:
595 return self.cl.get(self.nodeid, name, cache=self.cache) 600 return self.cl.get(self.nodeid, name, cache=self.cache)

Roundup Issue Tracker: http://roundup-tracker.org/