Bug #2651

Python, introspection, Windows: os.getlogin AttributeError

Added by J. Moringen over 7 years ago. Updated over 7 years ago.

Status:ResolvedStart date:09/08/2016
Priority:HighDue 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

Revision 9c3f2a8d
Added by J. Moringen over 7 years ago

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

Revision cdf638a2
Added by J. Moringen over 7 years ago

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

#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

Also available in: Atom PDF