Skip to content

Commit

Permalink
bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
dennyzhang committed Aug 8, 2017
1 parent 13f0d4b commit 88d51aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/git_tool/git_pull_codedir.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## pip install GitPython
## --
## Created : <2017-03-24>
## Updated: Time-stamp: <2017-07-05 20:35:24>
## Updated: Time-stamp: <2017-08-08 16:54:43>
##-------------------------------------------------------------------
import os, sys
import sys
Expand Down Expand Up @@ -49,13 +49,14 @@ def git_pull(code_dir):
separator = ","
for code_dir in code_dirs.split(separator):
git_output = git_pull(code_dir)
# print(git_output)
if git_output == 'Already up-to-date.':
has_changed = False
else:
has_changed = True
logging.info("Code has changed in %s. Detail: %s" % (code_dir, git_output))

if git_output is True:
if has_changed is True:
sys.exit(1)
else:
sys.exit(0)
Expand Down

0 comments on commit 88d51aa

Please sign in to comment.