#NEWLINE# def safe_close_queue( self , name , queue ) : #NEWLINE# #INDENT# self . debug ( 'Closing queue {0}' , name ) #NEWLINE# queue . close ( ) #NEWLINE# try : #NEWLINE# #INDENT# self . debug ( 'Joining thread for queue {0}' , name ) #NEWLINE# try : #NEWLINE# #INDENT# self . debug ( 'Joining queue {name} (size {size}, full: {full})' , name = name , size = queue . qsize ( ) , full = queue . full ( ) ) #NEWLINE# #UNINDENT# except NotImplementedError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# queue . join_thread ( ) #NEWLINE# #UNINDENT# except AssertionError as e : #NEWLINE# #INDENT# self . debug ( "Couldn't join queue {0}; error {1}" , name , e ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . debug ( 'Done closing {0}, no exceptions.' , name )