]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix os.getlogin() problem with no tty
authorKoert van der Veer <koert@cloudvps.com>
Thu, 9 Jan 2014 20:18:50 +0000 (21:18 +0100)
committerKoert van der Veer <koert@cloudvps.com>
Thu, 16 Jan 2014 12:57:30 +0000 (13:57 +0100)
commite86098cfc28f84505d4460108bbdfe019fe1efd0
tree3f7a05970697da12a706bcde7bd9a8388f6b9d15
parent5be4620ae5bb50c8436de0e11269c85a095ed40b
Fix os.getlogin() problem with no tty

Catch OSError(s) from  os.getlogin() and fall back to looking at
environment variables to figure out the user's name. The OSError
is thrown where there is no tty for the python process when
os.getlogin() is called.

Related-Bug: #1221491

Change-Id: I2bd735c9669ba9d25da108da44ea602f358b2dcc
bin/cinder-rootwrap