mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Check cookie file exists
This commit is contained in:
parent
db30833511
commit
82a38e6bd0
1 changed files with 6 additions and 3 deletions
|
|
@ -202,8 +202,11 @@ def setup_config(config, options):
|
|||
if options.useragent is not None:
|
||||
config["useragent"] = options.useragent
|
||||
if options.cookiefile is not None:
|
||||
if fileutil.is_readable(options.cookiefile):
|
||||
config["cookiefile"] = options.cookiefile
|
||||
else:
|
||||
if not fileutil.is_valid_config_source(options.cookiefile):
|
||||
log.error(
|
||||
LOG_CMDLINE, _("Cookie file %s does not exist."), options.cookiefile)
|
||||
elif not fileutil.is_readable(options.cookiefile):
|
||||
msg = _("Could not read cookie file %s") % options.cookiefile
|
||||
log.error(LOG_CMDLINE, msg)
|
||||
else:
|
||||
config["cookiefile"] = options.cookiefile
|
||||
|
|
|
|||
Loading…
Reference in a new issue