Skip to content
Snippets Groups Projects
Commit 75aa97f1 authored by Pierre Lalet's avatar Pierre Lalet Committed by GitHub
Browse files

Merge pull request #575 from 6WIND/gitversion-fix

Only read version from git when in scapy
parents c2333696 4584f36a
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,9 @@ def _version_from_git_describe():
>>> _version_from_git_describe()
'2.3.2.dev346'
"""
if not os.path.isdir(os.path.join(_SCAPY_PKG_DIR, '../.git')):
raise ValueError('not in scapy git repo')
p = subprocess.Popen(['git', 'describe', '--always'], cwd=_SCAPY_PKG_DIR,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment