Commits

Levi Lovelock committed b4a4763

BUILDENG-1727: Fixed error with retrieving the username.

  • Participants
  • Parent commits a6a899c

Comments (0)

Files changed (1)

File bellatrix/lib/ec2_lib.py

 import os
 import sys
 import time
+import pwd
 
 import boto
 from boto.s3.key import Key
                       block_device_map=mapping)
         logging.info("we got %d instance (should be only one)." % len(reservation.instances))
         i = reservation.instances[0]
-        self.tagInstance(i.id, "Name",  os.environ['USER'] + " started me")
+        self.tagInstance(i.id, "Name",  pwd.getpwuid(os.getuid()).pw_name + " started me")
         return i
 
     def stopInstance(self, i):