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,