Commit 71333989 authored by Alessio Treglia's avatar Alessio Treglia Committed by Vitezslav Humpa
Browse files

Don't use os.getlogin() to get the name of the user currently logged on.

parent ff9359e2
Pipeline #3755219 passed with stages
in 21 minutes and 38 seconds
......@@ -3,6 +3,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera
import locale
import os
import sys
import pwd
"""
The configuration module.
......@@ -12,7 +13,8 @@ __author__ = "Zack Cerza <zcerza@redhat.com>, David Malcolm <dmalcolm@redhat.com
def _userTmpDir(baseName):
# i.e. /tmp/dogtail-foo
return '-'.join(('/'.join(('/tmp', baseName)), os.environ['USER']))
logname = os.getenv('LOGNAME', default=pwd.getpwuid(os.getuid())[0])
return '-'.join(('/'.join(('/tmp', baseName)), logname))
class _Config(object):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment