def authorization_headers(username, server):
 if (not username):
  if ('AUTOTEST_USER' in os.environ):
   username = os.environ['AUTOTEST_USER']
  else:
   username = getpass.getuser()
 password = getpass.getpass(('Enter the password for %s: ' % username))
 base64string = base64.encodestring(('%s:%s' % (username, password)))[:(-1)]
 return {'AUTHORIZATION': ('Basic %s' % base64string)}

def authorization_headers ( username , server ) : if ( not username ) : if ( 'AUTOTEST_USER' in os . environ ) : username = os . environ [ 'AUTOTEST_USER' ] else : username = getpass . getuser ( ) password = getpass . getpass ( ( 'Enter the password for %s: ' % username ) ) base64string = base64 . encodestring ( ( '%s:%s' % ( username , password ) ) ) [ : ( - 1 ) ] return { 'AUTHORIZATION' : ( 'Basic %s' % base64string ) }
ask the user for their password .