aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Mason Larobina <mason.larobina@gmail.com>2009-08-09 02:05:10 +0800
committerGravatar Mason Larobina <mason.larobina@gmail.com>2009-08-09 02:05:10 +0800
commit6c2d3df5e74340a781ca7a53b4af660aaad404f8 (patch)
tree3ff87c323ffdaa8551d908823808491ec13d257d /examples
parent5c381e25c7e6e74441a332809d79750ca44b4d7f (diff)
Minor changes to cookie_daemon.py
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/data/uzbl/scripts/cookie_daemon.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/data/uzbl/scripts/cookie_daemon.py b/examples/data/uzbl/scripts/cookie_daemon.py
index 8be495e..3451727 100755
--- a/examples/data/uzbl/scripts/cookie_daemon.py
+++ b/examples/data/uzbl/scripts/cookie_daemon.py
@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-# For configuration and cookie daemon usage examples check out the the
+# For configuration and cookie daemon usage examples check out the the
# cookie daemon wiki page at http://www.uzbl.org/wiki/cookie_daemon.py
#
# Issues:
@@ -240,13 +240,13 @@ class CookieMonster:
'''Open the cookie jar.'''
cookie_jar = config['cookie_jar']
- if config['cookie_jar']:
+ if cookie_jar:
mkbasedir(cookie_jar)
# Create cookie jar object from file.
self.jar = cookielib.MozillaCookieJar(cookie_jar)
- if config['cookie_jar']:
+ if cookie_jar:
try:
# Attempt to load cookies from the cookie jar.
self.jar.load(ignore_discard=True)
@@ -414,7 +414,7 @@ if __name__ == "__main__":
metavar="FILE", help="manually specify the cookie jar location.")
parser.add_option('-m', '--memory', dest='memory', action='store_true',
- help="store cookies in memory only - do not write to disk")
+ help="store cookies in memory only - do not write to disk")
(options, args) = parser.parse_args()
@@ -423,7 +423,7 @@ if __name__ == "__main__":
echo("verbose mode on.")
if options.no_daemon:
- echo("daemon mode off")
+ echo("daemon mode off.")
config['daemon_mode'] = False
if options.cookie_socket:
@@ -448,6 +448,7 @@ if __name__ == "__main__":
echo("fatal error: expected int argument for --daemon-timeout")
sys.exit(1)
+ # Expand $VAR's in config keys that relate to paths.
for key in ['cookie_socket', 'cookie_jar']:
if config[key]:
config[key] = os.path.expandvars(config[key])