#NEWLINE# def request_login( self , remote_name , username = None ) : #NEWLINE# #INDENT# 'Request user to input their name and password\n        :param username If username is specified it only request password' #NEWLINE# user_input = '' #NEWLINE# while ( not username ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . out . write ( ( "Remote '%s' username: " % remote_name ) ) #NEWLINE# user_input = self . get_username ( remote_name ) #NEWLINE# username = Username ( user_input ) #NEWLINE# #UNINDENT# except InvalidNameException : #NEWLINE# #INDENT# self . out . error ( ( '%s is not a valid username' % user_input ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . out . write ( ( 'Please enter a password for "%s" account: ' % username ) ) #NEWLINE# try : #NEWLINE# #INDENT# pwd = self . get_password ( remote_name ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# raise ConanException ( ( 'Cancelled pass %s' % e ) ) #NEWLINE# #UNINDENT# return ( username , pwd )