|
From: <di...@us...> - 2007-01-25 16:46:27
|
Revision: 293
http://safekeep.svn.sourceforge.net/safekeep/?rev=293&view=rev
Author: dimi
Date: 2007-01-25 08:46:22 -0800 (Thu, 25 Jan 2007)
Log Message:
-----------
Use os.environ['LOGNAME'] instead of os.getlogin() to avoid errors when the controlling terminal goes missing (http://docs.python.org/lib/os-procinfo.html)
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-25 14:50:51 UTC (rev 292)
+++ safekeep/trunk/safekeep 2007-01-25 16:46:22 UTC (rev 293)
@@ -613,7 +613,7 @@
elif action is 'deploy':
info('%s: Key do not exist, generating it now: %s' % (id, privatekeyfile))
gencmd = 'ssh-keygen -q -b 1024 -t dsa -N "" -C "SafeKeep auto generated key at %s@%s" -f %s' % \
- (os.getlogin(), os.uname()[1], privatekeyfile)
+ (os.environ['LOGNAME'], os.uname()[1], privatekeyfile)
debug(gencmd)
if os.system(gencmd):
error('%s: Failed to generate key %s. Skipping client.' % (id, privatekeyfile))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|