Expand filenames given with the --config options.

This commit is contained in:
Bastian Kleineidam 2010-03-07 10:44:42 +01:00
parent af6cb287d7
commit 8afc07fb2b
2 changed files with 4 additions and 2 deletions

View file

@ -18,6 +18,7 @@ Fixes:
to RFC2368. So the syntax error about missing email-addresses gets
demoted to a warning.
Closes: SF bug #2910588
- cmdline: Expand tilde (~) in filenames given with the --config option.
5.1 "Let the right one in" (released 04.08.2009)

View file

@ -591,8 +591,9 @@ log.debug(LOG_CMDLINE, _("Python %(version)s on %(platform)s") % \
try:
files = []
if options.configfile:
if os.path.isfile(options.configfile):
files.append(options.configfile)
path = linkcheck.configuration.normpath(options.configfile)
if os.path.isfile(path):
files.append(path)
else:
log.warn(LOG_CMDLINE,
_("Unreadable config file: %r"), options.configfile)