mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-18 05:11:00 +00:00
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:
parent
afeae9fbe4
commit
2880af4589
1 changed files with 9 additions and 0 deletions
|
|
@ -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']:
|
||||
|
|
|
|||
Loading…
Reference in a new issue