From 3fadb3a598811ddb38445180377dd8d21ceb595b Mon Sep 17 00:00:00 2001 From: Bryan Stopp Date: Fri, 1 Jul 2016 17:00:45 -0500 Subject: [PATCH] Fixing issue where passports aren't saving for odd reason. --- .gitignore | 2 ++ passport/git.py | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9ab76a1..9570d53 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .DS_Store *.pyc __pycache__ +.idea + diff --git a/passport/git.py b/passport/git.py index 9a1a4b3..cea2fc1 100644 --- a/passport/git.py +++ b/passport/git.py @@ -86,18 +86,24 @@ def config_set(config, value, property): Exception: If subprocess.Popen() fails """ try: - subprocess.Popen([ + git_process = subprocess.Popen([ "git", "config", "--local", "user." + property, value - ], stdout=subprocess.PIPE) + ], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + + # Captures the git return code + exit_status = git_process.wait() except Exception: raise - return True + if exit_status == 0: + return True + else: + return False def config_remove(verbose=True):