settings: Put logs directory in user directory

Instead of writing to a location we can't write to
when running as a regular user, refer to a user
specific path, and use os.path.expanduser to handle
the references to ~.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 5cdf41c3
......@@ -32,7 +32,7 @@ def get_logs_dir():
if settings.intree:
return os.path.join(get_root_dir(), 'logs')
else:
return settings.get_value('runner', 'logs_dir')
return os.path.expanduser(settings.get_value('runner', 'logs_dir'))
def get_tmp_dir():
......
[runner]
root_dir = /usr/share/avocado
test_dir = /usr/share/avocado/tests
logs_dir = /var/log/avocado
logs_dir = ~/avocado/logs
tmp_dir = /tmp
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册