From: Martin Pitt Date: Sat, 16 Feb 2008 12:41:26 +0000 (+0100) Subject: buildd.py: prefer ~/.lpcookie X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=9b89b39402aa65d5252164ada05f74ec4ada4dca;p=bin.git buildd.py: prefer ~/.lpcookie --- diff --git a/buildd.py b/buildd.py index 598d8d1..766fb49 100755 --- a/buildd.py +++ b/buildd.py @@ -17,11 +17,13 @@ operation: status | retry | rescore [priority (default 5000)]''' % sys.argv[0] sys.exit(1) # find cookie file -try: - cookiefile = glob.glob(os.path.expanduser('~/.mozilla/*/*/cookies.txt'))[0] -except IndexError: - print >> sys.stderr, 'Could not find Firefox cookie file' - sys.exit(1) +cookiefile = os.path.expanduser('~/.lpcookie') +if not os.path.exists(cookiefile): + try: + cookiefile = glob.glob(os.path.expanduser('~/.mozilla/*/*/cookies.txt'))[0] + except IndexError: + print >> sys.stderr, 'Could not find Firefox cookie file' + sys.exit(1) # build HTML opener with cookie file cj = cookielib.MozillaCookieJar()