Skip to content

Commit e0646f7

Browse files
committed
Minor edit
1 parent c001440 commit e0646f7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

switch_model/__main__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@ def main():
3939
del sys.argv[1]
4040
if cmd == "--version":
4141
print("Switch model version " + switch_model.__version__)
42-
try:
43-
from switch_model.utilities import get_git_branch
44-
print(f"Switch git branch {get_git_branch()}")
45-
except:
46-
pass
42+
from switch_model.utilities import get_git_branch
43+
branch = get_git_branch()
44+
if branch is not None:
45+
print(f"Switch Git branch: {branch}")
4746
return 0
4847
if cmd == "solve":
4948
from switch_model.solve import main

0 commit comments

Comments
 (0)