From 966789d2aaca353f770eb81da13f82687029fe03 Mon Sep 17 00:00:00 2001 From: rossella Date: Mon, 18 Apr 2016 22:21:29 +0000 Subject: [PATCH] Fix template folder for Debian based distros Debian based distros install files in /usr/local not in sys.prefix. See [1] for more info. [1] https://wiki.debian.org/Python#Deviations_from_upstream Change-Id: I8bd9098f3f529a5ded2b6d2ec8b5081c34590ea8 --- gerrit_dash_creator/cmd/creator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gerrit_dash_creator/cmd/creator.py b/gerrit_dash_creator/cmd/creator.py index 0b3eded..fb3189d 100755 --- a/gerrit_dash_creator/cmd/creator.py +++ b/gerrit_dash_creator/cmd/creator.py @@ -83,6 +83,8 @@ def get_options(): # We need to support running with and without installation if os.path.exists('templates'): template_dir = 'templates' + elif os.path.exists('/usr/local/share/gerrit-dash-creator/templates'): + template_dir = '/usr/local/share/gerrit-dash-creator/templates' else: template_dir = os.path.join(sys.prefix, 'share', 'gerrit-dash-creator', 'templates')