fix: improve correctness of exits (#539)

* fix: improve correctness of exits

* refactor: use sys.exit
This commit is contained in:
Henry Schreiner
2021-01-17 14:13:26 -05:00
committed by GitHub
parent 45c3c2ea8e
commit 1441972046
8 changed files with 31 additions and 26 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import os
import sys
import textwrap
import time
from pathlib import Path
@@ -26,7 +27,7 @@ def main():
if git_repo_has_changes():
print('Your git repo has uncommitted changes. Commit or stash before continuing.')
exit(1)
sys.exit(1)
previous_branch = shell('git rev-parse --abbrev-ref HEAD',
check=True,