#NEWLINE# def _run_main( self , parsed_args , parsed_globals ) : #NEWLINE# #INDENT# ecr_client = create_client_from_parsed_globals ( self . _session , 'ecr' , parsed_globals ) #NEWLINE# if ( not parsed_args . registry_ids ) : #NEWLINE# #INDENT# result = ecr_client . get_authorization_token ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# result = ecr_client . get_authorization_token ( registryIds = username . registry_ids ) #NEWLINE# #UNINDENT# for auth in result [ 'authorizationData' ] : #NEWLINE# #INDENT# auth_token = b64decode ( auth [ 'authorizationToken' ] ) . decode ( ) #NEWLINE# ( username , password ) = auth_token . split ( ':' ) #NEWLINE# sys . stdout . write ( ( 'docker login -u %s -p %s -e none %s\n' % ( username , password , auth [ 'proxyEndpoint' ] ) ) ) #NEWLINE# #UNINDENT# return 0