Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store
*.pyc
__pycache__
.idea

12 changes: 9 additions & 3 deletions passport/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down