summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9307299)
raw | patch | inline | side by side (parent: 9307299)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 10 Jul 2002 06:39:37 +0000 (06:39 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 10 Jul 2002 06:39:37 +0000 (06:39 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@860 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
roundup/mailgw.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index b5727225dd47d9a76c86e9419fac75bf8fc2f68c..466913438a0fd8e959f9a52660471346ee4187bb 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
scraped from the web
. added sorting of checklist HTML display
. switched to using a session-based web login
+ . made mailgw handle set and modify operations on multilinks (bug #579094)
2002-06-24 0.4.2
diff --git a/roundup/mailgw.py b/roundup/mailgw.py
index ad9c10594e1aabf76365c9cf31997bc9d1c860a0..6ea92ffbfe2551fe5650f0fab3f05aa27bc31c5d 100644 (file)
--- a/roundup/mailgw.py
+++ b/roundup/mailgw.py
an exception, the original message is bounced back to the sender with the
explanatory message given in the exception.
-$Id: mailgw.py,v 1.75 2002-07-09 01:21:24 richard Exp $
+$Id: mailgw.py,v 1.76 2002-07-10 06:39:37 richard Exp $
'''
curvalue = []
# handle each add/remove in turn
+ # keep an extra list for all items that are
+ # definitely in the new list (in case of e.g.
+ # <propname>=A,+B, which should replace the old
+ # list with A,B)
+ set = 0
+ newvalue = []
for item in value.split(','):
item = item.strip()
item = item[1:]
elif item.startswith('+'):
item = item[1:]
+ else:
+ set = 1
# look up the value
try:
'for %s.'%(item, propname))
continue
else:
+ newvalue.append(item)
if item not in curvalue:
curvalue.append(item)
- # that's it, set the new Multilink property value
- props[propname] = curvalue
+ # that's it, set the new Multilink property value,
+ # or overwrite it completely
+ if set:
+ props[propname] = newvalue
+ else:
+ props[propname] = curvalue
# handle any errors parsing the argument list
if errors:
#
# $Log: not supported by cvs2svn $
+# Revision 1.75 2002/07/09 01:21:24 richard
+# Added ability for unit tests to turn off exception handling in mailgw so
+# that exceptions are reported earlier (and hence make sense).
+#
# Revision 1.74 2002/05/29 01:16:17 richard
# Sorry about this huge checkin! It's fixing a lot of related stuff in one go
# though.