Bug #2651
Python, introspection, Windows: os.getlogin AttributeError
Status: | Resolved | Start date: | 09/08/2016 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | J. Moringen | % Done: | 100% | |
Category: | Python | |||
Target version: | rsb-0.15 |
Description
I am currently trying to get rsb-python running with windows. The
pypi-Files are really helpful so thanks a lot for those. However I've
run into a problem with introspection. You use "os.getlogin()" in
line 224 in the introspection/__init__.py. However os has no function
getlogin under windows. You do catch an OSError, however an
AttributeError is raised in this case.
Associated revisions
For portability, use getpass to get user name in rsb/introspection/__init__.py
fixes #2651
- rsb/introspection/__init__.py (header): updated copyright
(toplevel): added import getpass
(ProcessInfo.__init__): use getpass.getuser instead of os.getlogin
Backport: For portability, use getpass to get user name in rsb/introspection/__init__.py
refs #2651
- rsb/introspection/__init__.py (header): updated copyright
(toplevel): added import getpass
(ProcessInfo.__init__): use getpass.getuser instead of os.getlogin
(cherry picked from commit 9c3f2a8d6eabb8328b22d22f10e2c3d3c020fdad)
History
#1 Updated by J. Moringen over 7 years ago
- Priority changed from Normal to High
#2 Updated by J. Moringen over 7 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset rsb-python|9c3f2a8d6eabb8328b22d22f10e2c3d3c020fdad.
#3 Updated by J. Moringen over 7 years ago
- Assignee set to J. Moringen
- % Done changed from 100 to 0
#4 Updated by J. Moringen over 7 years ago
- % Done changed from 0 to 100