From 079cc46458b6436185eb13a879ec6139fed9dcf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Fri, 4 Nov 2016 08:52:32 +0100 Subject: [PATCH] pungi: Fix reading multilib config files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running from git, the files should be found relative to the python module, not executable itself. This change makes it possible to load the files when running tests. Signed-off-by: Lubomír Sedlář --- pungi/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pungi/config.py b/pungi/config.py index ae1a74df..88ece6b7 100644 --- a/pungi/config.py +++ b/pungi/config.py @@ -24,7 +24,7 @@ from ConfigParser import SafeConfigParser # In development, `here` will point to the bin/ directory with scripts. here = sys.path[0] -MULTILIBCONF = (os.path.join(os.path.dirname(here), 'share', 'multilib') +MULTILIBCONF = (os.path.join(os.path.dirname(__file__), '..', 'share', 'multilib') if here != '/usr/bin' else '/usr/share/pungi/multilib')