@@ -89,20 +89,20 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env=
8989 if e .errno == errno .ENOENT :
9090 continue
9191 if verbose :
92- print ("unable to run %s" % dispcmd )
93- print (e )
92+ print ("unable to run %s" % dispcmd )
93+ print (e )
9494 return None , None
9595 else :
9696 if verbose :
97- print ("unable to find command, tried %s" % (commands ,))
97+ print ("unable to find command, tried %s" % (commands ,))
9898 return None , None
9999 stdout = p .communicate ()[0 ].strip ()
100100 if sys .version_info [0 ] >= 3 :
101101 stdout = stdout .decode ()
102102 if p .returncode != 0 :
103103 if verbose :
104- print ("unable to run %s (error)" % dispcmd )
105- print ("stdout was %s" % stdout )
104+ print ("unable to run %s (error)" % dispcmd )
105+ print ("stdout was %s" % stdout )
106106 return None , p .returncode
107107 return stdout , p .returncode
108108
@@ -131,7 +131,7 @@ def versions_from_parentdir(parentdir_prefix, root, verbose):
131131 root = os .path .dirname (root ) # up a level
132132
133133 if verbose :
134- print (
134+ print (
135135 "Tried directories %s but none started with prefix %s"
136136 % (str (rootdirs ), parentdir_prefix )
137137 )
@@ -184,7 +184,7 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose):
184184 refnames = keywords ["refnames" ].strip ()
185185 if refnames .startswith ("$Format" ):
186186 if verbose :
187- print ("keywords are unexpanded, not using" )
187+ print ("keywords are unexpanded, not using" )
188188 raise NotThisMethod ("unexpanded keywords, not a git-archive tarball" )
189189 refs = set ([r .strip () for r in refnames .strip ("()" ).split ("," )])
190190 # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of
@@ -201,15 +201,15 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose):
201201 # "stabilization", as well as "HEAD" and "master".
202202 tags = set ([r for r in refs if re .search (r"\d" , r )])
203203 if verbose :
204- print ("discarding '%s', no digits" % "," .join (refs - tags ))
204+ print ("discarding '%s', no digits" % "," .join (refs - tags ))
205205 if verbose :
206- print ("likely tags: %s" % "," .join (sorted (tags )))
206+ print ("likely tags: %s" % "," .join (sorted (tags )))
207207 for ref in sorted (tags ):
208208 # sorting will prefer e.g. "2.0" over "2.0rc1"
209209 if ref .startswith (tag_prefix ):
210210 r = ref [len (tag_prefix ) :]
211211 if verbose :
212- print ("picking %s" % r )
212+ print ("picking %s" % r )
213213 return {
214214 "version" : r ,
215215 "full-revisionid" : keywords ["full" ].strip (),
@@ -219,7 +219,7 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose):
219219 }
220220 # no suitable tags, so version is "0+unknown", but full hex is still there
221221 if verbose :
222- print ("no suitable tags, using unknown + full revision id" )
222+ print ("no suitable tags, using unknown + full revision id" )
223223 return {
224224 "version" : "0+unknown" ,
225225 "full-revisionid" : keywords ["full" ].strip (),
@@ -244,7 +244,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
244244 out , rc = run_command (GITS , ["rev-parse" , "--git-dir" ], cwd = root , hide_stderr = True )
245245 if rc != 0 :
246246 if verbose :
247- print ("Directory %s not under git control" % root )
247+ print ("Directory %s not under git control" % root )
248248 raise NotThisMethod ("'git rev-parse --git-dir' returned error" )
249249
250250 # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty]
@@ -301,7 +301,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
301301 if not full_tag .startswith (tag_prefix ):
302302 if verbose :
303303 fmt = "tag '%s' doesn't start with prefix '%s'"
304- print (fmt % (full_tag , tag_prefix ))
304+ print (fmt % (full_tag , tag_prefix ))
305305 pieces ["error" ] = "tag '%s' doesn't start with prefix '%s'" % (
306306 full_tag ,
307307 tag_prefix ,
0 commit comments