Skip to content

Commit 035f9f3

Browse files
committed
add-try-catch-block
1 parent e3b3b1c commit 035f9f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jupyter_releaser/util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ def get_version():
139139
"""Get the current package version"""
140140
if SETUP_PY.exists():
141141
warnings.warn("Using deprecated setup.py invocation")
142-
return run("python setup.py --version").split("\n")[-1]
142+
try:
143+
return run("python setup.py --version").split("\n")[-1]
144+
except CalledProcessError as e:
145+
print(e)
143146

144147
if PYPROJECT.exists():
145148
text = PYPROJECT.read_text(encoding="utf-8")

0 commit comments

Comments
 (0)