summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8cfcdbc)
raw | patch | inline | side by side (parent: 8cfcdbc)
author | dman13 <dman13@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sun, 16 Jun 2002 01:05:15 +0000 (01:05 +0000) | ||
committer | dman13 <dman13@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sun, 16 Jun 2002 01:05:15 +0000 (01:05 +0000) |
nosyreaction detector in the 0.4.1 extended template and has already
been fixed in CVS. We'll see.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@785 57a73879-2fb5-44c3-a270-3262357dd7e2
been fixed in CVS. We'll see.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@785 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/roundupdb.py | patch | blob | history |
diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py
index 755594c7ebbdc7f63e76042a4593ef590a290611..1ab2764af0cd02d134ee0558dfb19e6bb9ea9919 100644 (file)
--- a/roundup/roundupdb.py
+++ b/roundup/roundupdb.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: roundupdb.py,v 1.57 2002-06-15 15:49:29 dman13 Exp $
+# $Id: roundupdb.py,v 1.58 2002-06-16 01:05:15 dman13 Exp $
__doc__ = """
Extending hyperdb with types specific to issue-tracking.
# simplistic check to see if the url is valid,
# then append a trailing slash if it is missing
base = self.db.config.ISSUE_TRACKER_WEB
- # Oops, can't do this in python2.1
- #if not isinstance( base , "" ) or not base.startswith( "http://" ) :
- if type(base) != type("") or not base.startswith( "http://" ) :
+ if not isinstance( base , type('') ) or not base.startswith( "http://" ) :
base = "Configuration Error: ISSUE_TRACKER_WEB isn't a fully-qualified URL"
elif base[-1] != '/' :
base += '/'
def generateChangeNote(self, nodeid, oldvalues):
"""Generate a change note that lists property changes
"""
+
+ if __debug__ :
+ if not isinstance( oldvalues , type({}) ) :
+ raise TypeError(
+ "'oldvalues' must be dict-like, not %s."
+ % str(type(oldvalues)) )
+
cn = self.classname
cl = self.db.classes[cn]
changed = {}
props = cl.getprops(protected=0)
- # XXX DSH
- # Temporary work-around to prevent crashes and allow the issue to be
- # submitted.
- try :
- oldvalues.keys
- except AttributeError :
- # The arg isn't a dict. Precondition/interface violation.
- return '\n'.join(
- ('', '-'*10,
- "Precondition/interface Error -- 'oldvalues' isn't a dict." ,
- '-'*10 , '' , str(oldvalues) ) )
-
# determine what changed
for key in oldvalues.keys():
if key in ['files','messages']: continue
#
# $Log: not supported by cvs2svn $
+# Revision 1.57 2002/06/15 15:49:29 dman13
+# Use 'email' instead of 'rfc822', if available.
+# Don't use isinstance() on a string (not allowed in python 2.1).
+# Return an error message instead of crashing if 'oldvalues' isn't a
+# dict (in generateChangeNote).
+#
# Revision 1.56 2002/06/14 03:54:21 dman13
# #565992 ] if ISSUE_TRACKER_WEB doesn't have the trailing '/', add it
#
# . Login now takes you to the page you back to the were denied access to.
#
# Fixed:
-# . Lots of bugs, thanks Roché and others on the devel mailing list!
+# . Lots of bugs, thanks Roché and others on the devel mailing list!
#
# Revision 1.20 2001/11/25 10:11:14 jhermann
# Typo fix