# - add {start|stop|restart} command line arguments to make the cookie_daemon
# functionally similar to the daemons found in /etc/init.d/ (in gentoo)
# or /etc/rc.d/ (in arch).
# - add {start|stop|restart} command line arguments to make the cookie_daemon
# functionally similar to the daemons found in /etc/init.d/ (in gentoo)
# or /etc/rc.d/ (in arch).
- try:
- # Attempt to load cookies from the cookie jar.
- self.jar.load(ignore_discard=True)
+ if config['cookie_jar']:
+ try:
+ # Attempt to load cookies from the cookie jar.
+ self.jar.load(ignore_discard=True)
- # Ensure restrictive permissions are set on the cookie jar
- # to prevent other users on the system from hi-jacking your
- # authenticated sessions simply by copying your cookie jar.
- os.chmod(cookie_jar, 0600)
+ # Ensure restrictive permissions are set on the cookie jar
+ # to prevent other users on the system from hi-jacking your
+ # authenticated sessions simply by copying your cookie jar.
+ os.chmod(cookie_jar, 0600)
res = urllib2.addinfourl(StringIO.StringIO(), hdr,\
req.get_full_url())
self.jar.extract_cookies(res,req)
res = urllib2.addinfourl(StringIO.StringIO(), hdr,\
req.get_full_url())
self.jar.extract_cookies(res,req)
parser.add_option('-j', '--cookie-jar', dest='cookie_jar',\
metavar="FILE", help="manually specify the cookie jar location.")
parser.add_option('-j', '--cookie-jar', dest='cookie_jar',\
metavar="FILE", help="manually specify the cookie jar location.")