From 6837d83f5b54f01ae49d0b9789c0d98167714b10 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Tue, 27 Jun 2017 15:11:19 +0100 Subject: [PATCH] Fix setup.py requiring gen_web_gettext --- setup.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index f7af90fbc..ab3f3b637 100755 --- a/setup.py +++ b/setup.py @@ -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):