Skip to content
This repository was archived by the owner on Jun 17, 2021. It is now read-only.

Commit f4d0961

Browse files
committed
Use the print_ function from six instead of just using parens with a print statement
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@26504 fe389314-cf27-0410-b35b-8c050e845b92
1 parent b17a77d commit f4d0961

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

d2to1/zestreleaser.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import logging
1919
import os
2020

21+
from .extern.six import print_
2122
from .extern.six import moves as m
2223
ConfigParser = m.configparser.ConfigParser
2324

@@ -88,19 +89,20 @@ def _my_create_tag(self, version):
8889
msg = "Tagging %s" % (version,)
8990
cmd = 'git tag -s %s -m "%s"' % (version, msg)
9091
if os.path.isdir('.git/svn'):
91-
print("\nEXPERIMENTAL support for git-svn tagging!\n")
92+
print_("\nEXPERIMENTAL support for git-svn tagging!\n")
9293
cur_branch = open('.git/HEAD').read().strip().split('/')[-1]
93-
print("You are on branch %s." % (cur_branch,))
94+
print_("You are on branch %s." % (cur_branch,))
9495
if cur_branch != 'master':
95-
print("Only the master branch is supported for git-svn tagging.")
96-
print("Please tag yourself.")
97-
print("'git tag' needs to list tag named %s." % (version,))
96+
print_("Only the master branch is supported for git-svn "
97+
"tagging.")
98+
print_("Please tag yourself.")
99+
print_("'git tag' needs to list tag named %s." % (version,))
98100
sys.exit()
99101
cmd = [cmd]
100102
local_head = open('.git/refs/heads/master').read()
101103
trunk = open('.git/refs/remotes/trunk').read()
102104
if local_head != trunk:
103-
print("Your local master diverges from trunk.\n")
105+
print_("Your local master diverges from trunk.\n")
104106
# dcommit before local tagging
105107
cmd.insert(0, 'git svn dcommit')
106108
# create tag in svn
@@ -119,18 +121,18 @@ def _my_make_tag(self):
119121
if not isinstance(cmds, list):
120122
cmds = [cmds]
121123
if len(cmds) == 1:
122-
print("Tag needed to proceed, you can use the following command:")
124+
print_("Tag needed to proceed, you can use the following command:")
123125
for cmd in cmds:
124-
print(cmd)
126+
print_(cmd)
125127
if utils.ask("Run this command"):
126-
print(system(cmd))
128+
print_(system(cmd))
127129
else:
128130
# all commands are needed in order to proceed normally
129-
print("Please create a tag for %s yourself and rerun." % \
131+
print_("Please create a tag for %s yourself and rerun." % \
130132
(self.data['version'],))
131133
sys.exit()
132134
if not self.vcs.tag_exists('v' + self.data['version']):
133-
print("\nFailed to create tag %s!" % (self.data['version'],))
135+
print_("\nFailed to create tag %s!" % (self.data['version'],))
134136
sys.exit()
135137

136138
# Normally all this does is to return '--formats=zip', which is currently

0 commit comments

Comments
 (0)