From 81324b765da3382e0782cbf2facc7ca0d9c08e09 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 17 Jun 2019 07:35:14 -0400 Subject: [PATCH] Fix https://github.com/uBlockOrigin/uBlock-issues/issues/636 --- tools/make-firefox-meta.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/make-firefox-meta.py b/tools/make-firefox-meta.py index ae358a190..fa4ed7107 100644 --- a/tools/make-firefox-meta.py +++ b/tools/make-firefox-meta.py @@ -20,13 +20,14 @@ firefox_manifest_file = os.path.join(build_dir, 'manifest.json') with open(firefox_manifest_file) as f2: firefox_manifest = json.load(f2) -match = re.search('^(\d+\.\d+\.\d+)(\.\d+)$', version) -if not match: - # https://bugzilla.mozilla.org/show_bug.cgi?id=1459007 - # By design Firefox opens the sidebar with new installation of - # uBO when sidebar_action is present in the manifest. - # Remove sidebarAction support for stable release of uBO. - del firefox_manifest['sidebar_action'] +if 'sidebar_action' in firefox_manifest: + match = re.search('^(\d+\.\d+\.\d+)(\.\d+)$', version) + if not match: + # https://bugzilla.mozilla.org/show_bug.cgi?id=1459007 + # By design Firefox opens the sidebar with new installation of + # uBO when sidebar_action is present in the manifest. + # Remove sidebarAction support for stable release of uBO. + del firefox_manifest['sidebar_action'] firefox_manifest['version'] = version