summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-bz10
1 files changed, 7 insertions, 3 deletions
diff --git a/git-bz b/git-bz
index 9fa4890..b73fe52 100755
--- a/git-bz
+++ b/git-bz
@@ -134,8 +134,10 @@ def git_run(command, *args, **kwargs):
output, error = process.communicate(input)
if process.returncode != 0:
if not quiet and not interactive:
- print >>sys.stderr, error,
- print output,
+ # Using print here could result in Python adding a stray space
+ # before the next print
+ sys.stderr.write(error)
+ sys.stdout.write(output)
raise CalledProcessError(process.returncode, " ".join(to_run))
if interactive:
@@ -709,7 +711,9 @@ def expand_abbreviation(abbrev, l):
raise ValueError("No unique abbreviation expansion")
def prompt(message):
- print message, "[yn] ",
+ # Using print here could result in Python adding a stray space
+ # before the next print
+ sys.stdout.write(message + " [yn] ")
line = sys.stdin.readline().strip()
return line == 'y' or line == 'Y'