# HG changeset patch # User Jeff Hammel # Date 1354575370 28800 # Node ID f6513032ad2856f65c4619032e7e6806ff8a82f3 # Parent 07dc3f9de6bc66f3eae4ef2c0d836cd3eebd16ea add a blocks field diff -r 07dc3f9de6bc -r f6513032ad28 bzconsole/api.py --- a/bzconsole/api.py Mon May 14 15:43:30 2012 -0700 +++ b/bzconsole/api.py Mon Dec 03 14:56:10 2012 -0800 @@ -79,7 +79,7 @@ return self._request('/bug/%d' % number) def new(self, component, title, product=None, - version=None, description=None, whiteboard=(), cc=()): + version=None, description=None, whiteboard=(), cc=(), blocks=()): """file a new bug. username and password must be set""" # sanity check @@ -122,6 +122,11 @@ users.append(user[0]) request['cc'] = users + # add blocks, if given: + if blocks: + blocks = [int(i) for i in blocks] + request['blocks'] = blocks + # get the bug description if not description: description = tmpbuffer()