Skip to content

Commit 5b59dcf

Browse files
authored
Update setup.py
1 parent 9ba068a commit 5b59dcf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
requires = ["Django", "django-import-export", "django-author"]
1010

11-
version = subprocess.check_output(
12-
["git", "describe", "--abbrev=0", "--tags"]
13-
).decode("utf-8").strip()
14-
15-
if not version:
11+
try:
12+
version = subprocess.check_output(
13+
["git", "describe", "--abbrev=0", "--tags"]
14+
).decode("utf-8").strip()
15+
except subprocess.CalledProcessError:
1616
version = "0.dev" + datetime.datetime.now().strftime("%Y%m%d%H%M%S")
1717

1818
setup(

0 commit comments

Comments
 (0)