summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2008-08-15 17:00:56 -0400
committerWill Woods <wwoods@redhat.com>2008-08-15 17:00:56 -0400
commitff1ce61e55ae0b2f5e8fb30d39c77f8bdddfe4fa (patch)
treef1c2b5602811272e5b7853907882386011eeb26c
parent94bd4fce33bc55b5be23aca35ad23b0ac05b92e4 (diff)
downloadpython-bugzilla-ff1ce61e55ae0b2f5e8fb30d39c77f8bdddfe4fa.tar.gz
python-bugzilla-ff1ce61e55ae0b2f5e8fb30d39c77f8bdddfe4fa.tar.xz
python-bugzilla-ff1ce61e55ae0b2f5e8fb30d39c77f8bdddfe4fa.zip
finish _updatewhiteboard
-rw-r--r--bugzilla/bugzilla3.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bugzilla/bugzilla3.py b/bugzilla/bugzilla3.py
index 8186111..562c975 100644
--- a/bugzilla/bugzilla3.py
+++ b/bugzilla/bugzilla3.py
@@ -259,7 +259,14 @@ class RHBugzilla32(Bugzilla32):
if action == 'overwrite':
update[which] = text
else:
- raise NotImplementedError, "append/prepend not supported yet"
+ r = self._getbug(id)
+ if which not in r:
+ raise ValueError, "No such whiteboard %s in bug %i" % (which,id)
+ wb = r[which]
+ if action == 'prepend':
+ update[which] = text+' '+wb
+ elif action == 'append':
+ update[which] = wb+' '+text
self._update_bug(id,update)
# TODO: update this when the XMLRPC interface grows requestee support