summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathon Jongsma <jonathon@quotidian.org>2010-05-13 11:33:05 -0500
committerOwen W. Taylor <otaylor@fishsoup.net>2010-06-05 10:40:37 -0400
commite8544d7b0c67b62596b219a9b83868ff3a52b1f2 (patch)
tree458ecb98d05139cf0f33af1a9f8adf9f54988b8d
parent14250befc7ad9b82b380a1fb9389de6975d41d55 (diff)
downloadgit-bz-e8544d7b0c67b62596b219a9b83868ff3a52b1f2.tar.gz
Add support for epiphany with the webkit backend
When they moved to webkit as the browser engine, epiphany changed the location of their cookies database, but the format remained the same. This patch adds support for the new location, but falls back to the old location if the new one doesn't exist. https://bugzilla.gnome.org/show_bug.cgi?id=609668
-rwxr-xr-xgit-bz10
1 files changed, 8 insertions, 2 deletions
diff --git a/git-bz b/git-bz
index 941b636..6555566 100755
--- a/git-bz
+++ b/git-bz
@@ -492,8 +492,14 @@ def get_bugzilla_cookies_ff3(host):
return get_cookies_from_sqlite_xulrunner(host, cookies_sqlite, "Firefox")
def get_bugzilla_cookies_epy(host):
- ff_dir = os.path.expanduser('~/.gnome2/epiphany/mozilla/epiphany')
- cookies_sqlite = os.path.join(ff_dir, "cookies.sqlite")
+ # epiphany-webkit migrated the cookie db to a different location, but the
+ # format is the same
+ profile_dir = os.path.expanduser('~/.gnome2/epiphany')
+ cookies_sqlite = os.path.join(profile_dir, "cookies.sqlite")
+ if not os.path.exists(cookies_sqlite):
+ # try the old location
+ cookies_sqlite = os.path.join(profile_dir, "mozilla/epiphany/cookies.sqlite")
+
if not os.path.exists(cookies_sqlite):
raise CookieError("%s doesn't exist" % cookies_sqlite)