comparison roundup/roundupdb.py @ 1814:ffba0a574b4e maint-0.6

Apply Error fix backported to main-0-6
author Andrey Lebedev <kedder@users.sourceforge.net>
date Thu, 18 Sep 2003 07:29:56 +0000
parents b3abda04a690
children 1d86402ce5e8
comparison
equal deleted inserted replaced
1787:cc5e997fd6b6 1814:ffba0a574b4e
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: roundupdb.py,v 1.86 2003-04-27 02:24:37 richard Exp $ 18 # $Id: roundupdb.py,v 1.86.2.1 2003-09-18 07:29:56 kedder Exp $
19 19
20 __doc__ = """ 20 __doc__ = """
21 Extending hyperdb with types specific to issue-tracking. 21 Extending hyperdb with types specific to issue-tracking.
22 """ 22 """
23 23
425 for key in oldvalues.keys(): 425 for key in oldvalues.keys():
426 if key in ['files','messages']: 426 if key in ['files','messages']:
427 continue 427 continue
428 if key in ('activity', 'creator', 'creation'): 428 if key in ('activity', 'creator', 'creation'):
429 continue 429 continue
430 new_value = cl.get(nodeid, key) 430 # not all keys from oldvalues might be available in database
431 # this happens when property was deleted
432 try:
433 new_value = cl.get(nodeid, key)
434 except KeyError:
435 continue
431 # the old value might be non existent 436 # the old value might be non existent
437 # this happens when property was added
432 try: 438 try:
433 old_value = oldvalues[key] 439 old_value = oldvalues[key]
434 if type(new_value) is type([]): 440 if type(new_value) is type([]):
435 new_value.sort() 441 new_value.sort()
436 old_value.sort() 442 old_value.sort()

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