bugfix: crash when linkulatorrc doesn't exist

This commit is contained in:
cmccabe 2020-01-15 16:18:28 +00:00
parent fbc2d6dff6
commit 5577941f88
1 changed files with 5 additions and 0 deletions

View File

@ -77,6 +77,11 @@ def init():
USER.datadir.mkdir(mode=0o755, exist_ok=True)
if not USER.settingsfile.is_file():
with open(USER.settingsfile, 'w+') as the_file:
the_file.write("[User Status]\nlastlogin = 0.0\n\n[User Settings]\nbrowser = lynx")
if not is_readable(USER.datadir.stat().st_mode):
print(
"Warning: %s is not group or other readable - changing permissions"