From 7609110c1890955981b157569c4ed08c88eb5934 Mon Sep 17 00:00:00 2001 From: Pierre LALET Date: Fri, 12 Jan 2018 10:47:49 +0100 Subject: [PATCH] Windows: fix version detection from git (@karpierz) --- scapy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scapy/__init__.py b/scapy/__init__.py index 5db3f574a..4f3857808 100644 --- a/scapy/__init__.py +++ b/scapy/__init__.py @@ -38,7 +38,7 @@ 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')): + if not os.path.isdir(os.path.join(os.path.dirname(_SCAPY_PKG_DIR), '.git')): raise ValueError('not in scapy git repo') p = subprocess.Popen(['git', 'describe', '--always'], cwd=_SCAPY_PKG_DIR,