summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYawar Amin <yawar.amin@gmail.com>2010-10-23 21:08:23 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2015-02-26 16:05:51 -0500
commit660a5ea29de7919d2bd62545b7f36a8b7bc216c3 (patch)
tree4f70a30b0fb1ac6cf6d9c03971fcbad928363e05
parentae1c2a710f43697ad31460044377c3b8a0459bbb (diff)
downloadgit-bz-660a5ea29de7919d2bd62545b7f36a8b7bc216c3.tar.gz
Support FF3 and Google Chrome on Mac
Modify cookie getter functions to find the directories where the browser cookies are stored on Mac OS X. Applied with minor changes. See also: http://www.chromium.org/user-experience/user-data-directory https://bugzilla.gnome.org/show_bug.cgi?id=738337
-rwxr-xr-xgit-bz17
1 files changed, 14 insertions, 3 deletions
diff --git a/git-bz b/git-bz
index b558f96..7b0fe69 100755
--- a/git-bz
+++ b/git-bz
@@ -620,7 +620,10 @@ def get_cookies_from_sqlite_xulrunner(host, cookies_sqlite, name):
"select name,value,path,expiry from moz_cookies where host in (:host, '.'||:host)")
def get_bugzilla_cookies_ff3(host):
- profiles_dir = os.path.expanduser('~/.mozilla/firefox')
+ if os.uname()[0] == 'Darwin':
+ profiles_dir = os.path.expanduser('~/Library/Application Support/Firefox')
+ else:
+ profiles_dir = os.path.expanduser('~/.mozilla/firefox')
profile_path = None
cp = RawConfigParser()
@@ -678,14 +681,22 @@ def get_bugzilla_cookies_chr(host, browser, config_dir):
chromium_time=True)
def get_bugzilla_cookies_chromium(host):
+ if os.uname()[0] == 'Darwin':
+ config_dir = '~/Library/Application Support/Chromium/Default'
+ else:
+ config_dir = '~/.config/chromium/Default'
return get_bugzilla_cookies_chr(host,
"Chromium",
- '~/.config/chromium/Default')
+ config_dir)
def get_bugzilla_cookies_google_chrome(host):
+ if os.uname()[0] == 'Darwin':
+ config_dir = '~/Library/Application Support/Google/Chrome/Default'
+ else:
+ config_dir = '~/.config/google-chrome/Default'
return get_bugzilla_cookies_chr(host,
"Google Chrome",
- '~/.config/google-chrome/Default')
+ config_dir)
browsers = { 'firefox3' : get_bugzilla_cookies_ff3,
'epiphany' : get_bugzilla_cookies_epy,