Skip to content

Commit d40b9b9

Browse files
author
Derrick Hudson
committed
Removed temporary workaround.
It seems it was a bug in the nosyreaction detector in the 0.4.1 extended template and has already been fixed in the repo. We'll see.
1 parent d627ee8 commit d40b9b9

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

roundup/roundupdb.py

Lines changed: 16 additions & 17 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: roundupdb.py,v 1.57 2002-06-15 15:49:29 dman13 Exp $
18+
# $Id: roundupdb.py,v 1.58 2002-06-16 01:05:15 dman13 Exp $
1919

2020
__doc__ = """
2121
Extending hyperdb with types specific to issue-tracking.
@@ -521,9 +521,7 @@ def email_signature(self, nodeid, msgid):
521521
# simplistic check to see if the url is valid,
522522
# then append a trailing slash if it is missing
523523
base = self.db.config.ISSUE_TRACKER_WEB
524-
# Oops, can't do this in python2.1
525-
#if not isinstance( base , "" ) or not base.startswith( "http://" ) :
526-
if type(base) != type("") or not base.startswith( "http://" ) :
524+
if not isinstance( base , type('') ) or not base.startswith( "http://" ) :
527525
base = "Configuration Error: ISSUE_TRACKER_WEB isn't a fully-qualified URL"
528526
elif base[-1] != '/' :
529527
base += '/'
@@ -578,23 +576,18 @@ def generateCreateNote(self, nodeid):
578576
def generateChangeNote(self, nodeid, oldvalues):
579577
"""Generate a change note that lists property changes
580578
"""
579+
580+
if __debug__ :
581+
if not isinstance( oldvalues , type({}) ) :
582+
raise TypeError(
583+
"'oldvalues' must be dict-like, not %s."
584+
% str(type(oldvalues)) )
585+
581586
cn = self.classname
582587
cl = self.db.classes[cn]
583588
changed = {}
584589
props = cl.getprops(protected=0)
585590

586-
# XXX DSH
587-
# Temporary work-around to prevent crashes and allow the issue to be
588-
# submitted.
589-
try :
590-
oldvalues.keys
591-
except AttributeError :
592-
# The arg isn't a dict. Precondition/interface violation.
593-
return '\n'.join(
594-
('', '-'*10,
595-
"Precondition/interface Error -- 'oldvalues' isn't a dict." ,
596-
'-'*10 , '' , str(oldvalues) ) )
597-
598591
# determine what changed
599592
for key in oldvalues.keys():
600593
if key in ['files','messages']: continue
@@ -666,6 +659,12 @@ def generateChangeNote(self, nodeid, oldvalues):
666659

667660
#
668661
# $Log: not supported by cvs2svn $
662+
# Revision 1.57 2002/06/15 15:49:29 dman13
663+
# Use 'email' instead of 'rfc822', if available.
664+
# Don't use isinstance() on a string (not allowed in python 2.1).
665+
# Return an error message instead of crashing if 'oldvalues' isn't a
666+
# dict (in generateChangeNote).
667+
#
669668
# Revision 1.56 2002/06/14 03:54:21 dman13
670669
# #565992 ] if ISSUE_TRACKER_WEB doesn't have the trailing '/', add it
671670
#
@@ -856,7 +855,7 @@ def generateChangeNote(self, nodeid, oldvalues):
856855
# . Login now takes you to the page you back to the were denied access to.
857856
#
858857
# Fixed:
859-
# . Lots of bugs, thanks Roché and others on the devel mailing list!
858+
# . Lots of bugs, thanks Roché and others on the devel mailing list!
860859
#
861860
# Revision 1.20 2001/11/25 10:11:14 jhermann
862861
# Typo fix

0 commit comments

Comments
 (0)