From 79d5a6cc7d9072a28fbd990be9f1a9fd9d660cfd Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 29 Mar 2013 00:31:58 +0100 Subject: [PATCH] Using __file__ was getting the wrong location. __file__ is relative to pbr itself inside of a remote pip build. Change-Id: I76215abadc8a1a95f5e82680593a856e71d262ec --- pbr/packaging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbr/packaging.py b/pbr/packaging.py index ed4c73b6..e3e7409f 100644 --- a/pbr/packaging.py +++ b/pbr/packaging.py @@ -136,7 +136,7 @@ def _run_shell_command(cmd, throw_on_error=False): def _get_git_directory(): - parent_dir = os.path.dirname(__file__) + parent_dir = os.path.dirname(os.curdir) while True: git_dir = os.path.join(parent_dir, '.git') if os.path.exists(git_dir):