generate new user-specific config dir if not already there

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2234 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2005-01-28 15:54:14 +00:00
parent afeae9fbe4
commit 2880af4589

View file

@ -551,6 +551,15 @@ if constructauth:
linkcheck.log.debug(linkcheck.LOG_CMDLINE, "configuration: %s",
pprint.pformat(config.items()))
# try to generate empty config dir if not already there
userconfdir = linkcheck.configuration.normpath("~/.linkchecker")
if not os.path.exists(userconfdir):
try:
os.mkdir(userconfdir, 0700)
except OSError:
# ignore errors
pass
# interactive input
if len(args) <= 0:
if config['interactive']: