[Piglit] [PATCH 07/18] core.py: Fix bug in get_config
Dylan Baker
baker.dylan.c at gmail.com
Tue Aug 19 13:25:01 PDT 2014
A bug was introduced in 9e0c3ee1, this fixes it.
Because the get_config needs to find the piglit root, it has a hard
coded path to look for <current file>/../.. which worked when it was in
framework/programs/run.py, but in the mentioned commit the function was
moved to framework/core.py, a level down, so the hard coded path no
longer worked. This patch removes a '..', so the function now searches
for the right depth.
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
framework/core.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/framework/core.py b/framework/core.py
index d5f1fcc..cd73ddc 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -49,7 +49,7 @@ def get_config(arg=None):
for d in ['.',
os.environ.get('XDG_CONFIG_HOME',
os.path.expandvars('$HOME/.config')),
- os.path.join(os.path.dirname(__file__), '..', '..')]:
+ os.path.join(os.path.dirname(__file__), '..')]:
try:
with open(os.path.join(d, 'piglit.conf'), 'r') as f:
PIGLIT_CONFIG.readfp(f)
--
2.0.4
More information about the Piglit
mailing list