# HG changeset patch # User Jeff Hammel # Date 1379613313 25200 # Node ID 39325717218d3d833d9b4b36a62525b946860e83 # Parent 8e245a01829d3cdd93abc3c0ad663b747190dc4d attach comments diff -r 8e245a01829d -r 39325717218d bzconsole/api.py --- a/bzconsole/api.py Mon Sep 16 04:51:48 2013 -0700 +++ b/bzconsole/api.py Thu Sep 19 10:55:13 2013 -0700 @@ -180,10 +180,6 @@ assert self.username and self.password, "Must be authenticated" - if not description: - # fairly hacky :/ - description = attachment - # read contents if '://' in attachment: # URL @@ -200,6 +196,8 @@ else: # TODO: better content_type content_type = 'text/plain' + if not description: + description = basename # patch flags flags = [] @@ -225,6 +223,8 @@ 'is_private': False, 'size': len(contents) } + if comment: + attachment['comments'] = [self._comment(comment)] return self._request('/bug/%s/attachment' % bug, attachment) diff -r 8e245a01829d -r 39325717218d setup.py --- a/setup.py Mon Sep 16 04:51:48 2013 -0700 +++ b/setup.py Thu Sep 19 10:55:13 2013 -0700 @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import sys, os -version = '0.3.2' +version = '0.3.3' readme = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'README.txt')