Ticket #143: stdout

File stdout, 660 bytes (added by Silvan Scherrer, 7 years ago)

patch usr/share/hplip/base/g.py with the attached one please and try again

Line 
1Index: base/g.py
2===================================================================
3--- base/g.py (revision 2154)
4+++ base/g.py (working copy)
5@@ -267,9 +267,13 @@
6 prop.installed_version_int = 0
7
8 prop.home_dir = sys_conf.get('dirs', 'home', os.path.realpath(os.path.normpath(os.getcwd())))
9-prop.username = pwd.getpwuid(os.getuid())[0]
10-pdb = pwd.getpwnam(prop.username)
11-prop.userhome = pdb[5]
12+if os.name == 'os2':
13+ prop.username = os.getenv("USER")
14+ prop.userhome = os.getenv("HOME")
15+else:
16+ prop.username = pwd.getpwuid(os.getuid())[0]
17+ pdb = pwd.getpwnam(prop.username)
18+ prop.userhome = pdb[5]
19
20 prop.history_size = 50
21