diff options
author | Chris Ball <cjb@laptop.org> | 2009-06-26 16:16:10 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2009-06-26 16:16:10 -0400 |
commit | acf7b0cc492142ef0bbf1c04aed652a53caf7fe1 (patch) | |
tree | 83caecf530df36cc9f88bd94373b0fea0129b979 /becommands | |
parent | 34b2884112e3c3ca0cc0ac83df68c66f6b2729c4 (diff) | |
parent | 97aeb18b20f901950da0355471fdc17055f3f4a8 (diff) | |
download | bugseverywhere-acf7b0cc492142ef0bbf1c04aed652a53caf7fe1.tar.gz |
Merge with W. Trevor King's tree, which allows attaching binary files to bugs.
Diffstat (limited to 'becommands')
-rw-r--r-- | becommands/comment.py | 10 | ||||
-rw-r--r-- | becommands/depend.py | 2 | ||||
-rw-r--r-- | becommands/tag.py | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/becommands/comment.py b/becommands/comment.py index f7459dd..b31a6e7 100644 --- a/becommands/comment.py +++ b/becommands/comment.py @@ -93,9 +93,13 @@ def execute(args, test=False): raise cmdutil.UserError("No comment entered.") body = body.decode('utf-8') elif args[1] == '-': # read body from stdin - body = sys.stdin.read() - if not body.endswith('\n'): - body+='\n' + binary = not options.content_type.startswith("text/") + if not binary: + body = sys.stdin.read() + if not body.endswith('\n'): + body+='\n' + else: # read-in without decoding + body = sys.__stdin__.read() else: # body = arg[1] body = args[1] if not body.endswith('\n'): diff --git a/becommands/depend.py b/becommands/depend.py index 8dbb2eb..0e9ee97 100644 --- a/becommands/depend.py +++ b/becommands/depend.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -"""Add/remove bug dependencies.""" +"""Add/remove bug dependencies""" from libbe import cmdutil, bugdir import os, copy __desc__ = __doc__ diff --git a/becommands/tag.py b/becommands/tag.py index 5a18a7c..ab0324e 100644 --- a/becommands/tag.py +++ b/becommands/tag.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -"""Tag a bug, or search bugs for tags.""" +"""Tag a bug, or search bugs for tags""" from libbe import cmdutil, bugdir import os, copy __desc__ = __doc__ |