changeset 32:e843b7f1f400

fix up depends_on
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 04 Dec 2012 13:47:50 -0800
parents f6513032ad28
children 19c6b5cea57f
files bzconsole/api.py bzconsole/main.py
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bzconsole/api.py	Mon Dec 03 14:56:10 2012 -0800
+++ b/bzconsole/api.py	Tue Dec 04 13:47:50 2012 -0800
@@ -79,7 +79,8 @@
         return self._request('/bug/%d' % number)
 
     def new(self, component, title, product=None,
-            version=None, description=None, whiteboard=(), cc=(), blocks=()):
+            version=None, description=None, whiteboard=(), cc=(),
+            blocks=(), depends_on=()):
         """file a new bug. username and password must be set"""
 
         # sanity check
@@ -127,6 +128,11 @@
             blocks = [int(i) for i in blocks]
             request['blocks'] = blocks
 
+        # add depends_on, if given
+        if depends_on:
+            depends_on = [int(i) for i in depends_on]
+            request['depends_on'] = depends_on
+
         # get the bug description
         if not description:
             description = tmpbuffer()
--- a/bzconsole/main.py	Mon Dec 03 14:56:10 2012 -0800
+++ b/bzconsole/main.py	Tue Dec 04 13:47:50 2012 -0800
@@ -19,7 +19,7 @@
             if component in dupe:
                 return '>>>DUPLICATE<<<'
             return 'Component "%s" not found' % component
-            
+
         buffer = StringIO()
         print >> buffer, 'Unique:'
         for key in sorted(unique.keys()):