def _username():
 if pwd:
  username = pwd.getpwuid(os.getuid()).pw_name
 else:
  username = getpass.getuser()
 return username

def _username ( ) : if pwd : username = pwd . getpwuid ( os . getuid ( ) ) . pw_name else : username = getpass . getuser ( ) return username
grain for the minion username .