From 9b89b39402aa65d5252164ada05f74ec4ada4dca Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sat, 16 Feb 2008 13:41:26 +0100 Subject: [PATCH] buildd.py: prefer ~/.lpcookie --- buildd.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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() -- 2.39.2