From dfbb6f7cdeb2b307678728801d466d207759372f Mon Sep 17 00:00:00 2001 From: Tommi Komulainen Date: Thu, 20 Nov 2008 15:32:07 +0000 Subject: Make firefox profile lookup more relaxed Select the first profile with a Path entry, and in case of multiple profiles use the one with Default=1 Fixes profile lookup with profiles.ini that looks like: [General] StartWithLastProfile=1 [Profile0] Name=default IsRelative=1 Path=t0ps3cr3t.default --- git-bz | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/git-bz b/git-bz index 7a0f40c..ab9289c 100755 --- a/git-bz +++ b/git-bz @@ -441,7 +441,11 @@ def get_bugzilla_cookies(host): cp = RawConfigParser() cp.read(os.path.join(profiles_dir, "profiles.ini")) for section in cp.sections(): - if cp.has_option(section, "Default") and cp.get(section, "Default").strip() == "1": + if not cp.has_option(section, "Path"): + continue + + if profile_path is None or ( + cp.has_option(section, "Default") and cp.get(section, "Default").strip() == "1"): profile_path = os.path.join(profiles_dir, cp.get(section, "Path").strip()) if not profile_path: -- cgit v1.2.3