Skip to content

Commit

Permalink
fix for stderr crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Terje Sandstrom committed Dec 9, 2019
1 parent 582bb07 commit 5a0b07c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions listgits/listgits.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ def listgits(cwd,level,short,local,remotes,isSearch,gitoptions,results):
else:
git = git + ['remote','-v']
proc = subprocess.Popen(git,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
stdout = proc.communicate()[0].decode("utf-8").split('\n')
stderr = proc.communicate()[1].decode("utf-8").split('\n')
stdout_value, stderr_value = proc.communicate()
stdout = stdout_value.decode("utf-8").split('\n')
stderr = []
if stderr_value is not None:
stderr = stderr_value.decode("utf-8").split('\n')
if len(stdout[0])==0:
if not remotes and not isSearch:
print (spc+'Folder '+root+'/'+dir+' has local repo only')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="listgits",
version="1.0.1",
version="1.0.3",
author="Terje Sandstrom",
author_email="[email protected]",
description="Python command line program for listing git repositories under a folder root, and optionally run any git command on those repos",
Expand Down

0 comments on commit 5a0b07c

Please sign in to comment.