0007824: Regression: running gramps from crontab fails
This commit is contained in:
parent
b381f2dd8b
commit
542450bf6d
@ -2529,7 +2529,9 @@ def write_lock_file(name):
|
|||||||
try:
|
try:
|
||||||
user = os.getlogin()
|
user = os.getlogin()
|
||||||
except:
|
except:
|
||||||
user = os.environ['USER'] #not win, don't need get_env_var
|
# not win, so don't need get_env_var.
|
||||||
|
# under cron getlogin() throws and there is no USER.
|
||||||
|
user = os.environ.get('USER', 'noUSER')
|
||||||
if host:
|
if host:
|
||||||
text = "%s@%s" % (user, host)
|
text = "%s@%s" % (user, host)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user