Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
dogtail
dogtail
Commits
71333989
Commit
71333989
authored
Jul 21, 2016
by
Alessio Treglia
Committed by
Vitezslav Humpa
Jul 21, 2016
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
dogtail/config.py
dogtail/config.py
+3
-1
No files found.
dogtail/config.py
View file @
71333989
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment