Add local fallback for theme file

Useful for development
feature/create-torrent
Kai Huuhko 7 years ago
parent 0cfc9a8653
commit 09c15bfd7a
  1. 10
      epour/gui/__init__.py

@ -20,6 +20,7 @@
#
import os
import sys
import cgi
import logging
from datetime import timedelta, datetime
@ -75,6 +76,15 @@ for data_path in load_data_paths("epour"):
theme_file = os.path.join(data_path, "themes", "default.edj")
break
if not theme_file:
dir_path = os.getcwd()
path = os.path.join(dir_path, "data", "themes", "default.edj")
if os.path.exists(path):
theme_file = path
else:
sys.exit("Theme file not found, will not progress without it. Compile the theme with setup.py build_edc")
class MainInterface(object):

Loading…
Cancel
Save