Fix setup.py requiring gen_web_gettext

This commit is contained in:
Calum Lind 2017-06-27 15:11:19 +01:00
parent 3c1d7da698
commit 6837d83f5b
1 changed files with 8 additions and 4 deletions

View File

@ -134,10 +134,14 @@ class BuildWebUI(cmd.Command):
sys.exit(1)
# Create the gettext.js file for translations.
from gen_web_gettext import create_gettext_js
deluge_all_path = os.path.join(js_basedir, self.JS_SRC_DIRS[0])
print('Creating WebUI translation file: %s/gettext.js' % deluge_all_path)
create_gettext_js(deluge_all_path)
try:
from gen_web_gettext import create_gettext_js
except ImportError:
pass
else:
deluge_all_path = os.path.join(js_basedir, self.JS_SRC_DIRS[0])
print('Creating WebUI translation file: %s/gettext.js' % deluge_all_path)
create_gettext_js(deluge_all_path)
class CleanWebUI(cmd.Command):