From ba21a00938461c31bfee6b09f1e457e11fe83f62 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Wed, 4 Dec 2024 00:46:16 +0100 Subject: [PATCH] Marionette: Fix Firefox location discovery --- grafanimate/marionette.py | 7 ++++--- grafanimate/util.py | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/grafanimate/marionette.py b/grafanimate/marionette.py index 78dc5ef..d3239a3 100644 --- a/grafanimate/marionette.py +++ b/grafanimate/marionette.py @@ -110,10 +110,11 @@ def configure_marionette(self): @classmethod def find_firefox(cls): - candidates = [ + candidates = [] + candidates += where.where("firefox-bin") + where.where("firefox-esr") + candidates += [ os.environ.get("FIREFOX_BIN"), - where.where("firefox-bin"), - where.where("firefox-esr"), + "/Applications/Firefox.app/Contents/MacOS/firefox", "/Applications/Firefox.app/Contents/MacOS/firefox-bin", ] firefox = find_program_candidate(candidates) diff --git a/grafanimate/util.py b/grafanimate/util.py index 806b055..ebe25ed 100644 --- a/grafanimate/util.py +++ b/grafanimate/util.py @@ -43,6 +43,8 @@ def read_list(data, separator=","): def find_program_candidate(candidates): for candidate in candidates: + if candidate is None: + continue if os.path.isfile(candidate): return candidate