summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommi Komulainen <tko@litl.com>2008-11-20 15:32:07 +0000
committerOwen W. Taylor <otaylor@fishsoup.net>2008-11-20 15:26:43 -0500
commitdfbb6f7cdeb2b307678728801d466d207759372f (patch)
treea1a194612d372f35a8845ab0071c5864d667021d
parent8d049cccdaf2fa1d5710e3cc613c4cbcc3a31e45 (diff)
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
-rwxr-xr-xgit-bz6
1 files changed, 5 insertions, 1 deletions
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: