#NEWLINE# @ staticmethod #NEWLINE# def _list_account_job( conn , options , result_queue ) : #NEWLINE# #INDENT# marker = '' #NEWLINE# error = None #NEWLINE# try : #NEWLINE# #INDENT# while True : #NEWLINE# #INDENT# ( _ , items ) = conn . get_account ( marker = marker , prefix = options [ 'prefix' ] ) #NEWLINE# if ( not items ) : #NEWLINE# #INDENT# result_queue . put ( None ) #NEWLINE# return #NEWLINE# #UNINDENT# if options [ 'long' ] : #NEWLINE# #INDENT# for i in items : #NEWLINE# #INDENT# name = i [ 'name' ] #NEWLINE# i [ 'meta' ] = conn . head_container ( name ) #NEWLINE# #UNINDENT# #UNINDENT# res = { #NEWLINE# #INDENT# 'action' : 'list_account_part' , #NEWLINE# 'container' : None , #NEWLINE# 'prefix' : options [ 'prefix' ] , #NEWLINE# 'success' : True , #NEWLINE# 'listing' : items , #NEWLINE# 'marker' : i , #NEWLINE# #UNINDENT# } #NEWLINE# result_queue . put ( res ) #NEWLINE# marker = items [ ( - 1 ) ] . get ( 'name' , items [ ( - 1 ) ] . get ( 'subdir' ) ) #NEWLINE# #UNINDENT# #UNINDENT# except ClientException as err : #NEWLINE# #INDENT# ( traceback , err_time ) = report_traceback ( ) #NEWLINE# logger . exception ( err ) #NEWLINE# if ( err . http_status != 404 ) : #NEWLINE# #INDENT# error = ( err , traceback , err_time ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# error = ( SwiftError ( 'Account not found' , exc = err ) , traceback , err_time ) #NEWLINE# #UNINDENT# #UNINDENT# except Exception as err : #NEWLINE# #INDENT# ( traceback , err_time ) = report_traceback ( ) #NEWLINE# logger . exception ( err ) #NEWLINE# error = ( err , traceback , err_time ) #NEWLINE# #UNINDENT# res = { #NEWLINE# #INDENT# 'action' : 'list_account_part' , #NEWLINE# 'container' : None , #NEWLINE# 'prefix' : options [ 'prefix' ] , #NEWLINE# 'success' : False , #NEWLINE# 'marker' : marker , #NEWLINE# 'error' : error [ 0 ] , #NEWLINE# 'traceback' : error [ 1 ] , #NEWLINE# 'error_timestamp' : error [ 2 ] , #NEWLINE# #UNINDENT# } #NEWLINE# result_queue . put ( res ) #NEWLINE# result_queue . put ( None )