#NEWLINE# def unregister_image_format( format_name ) : #NEWLINE# #INDENT# global FORMATS #NEWLINE# try : #NEWLINE# #INDENT# format_name = format_name . name #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# del FORMATS_BY_NAME [ format_name ] #NEWLINE# FORMATS = [ FORMATS for fmt in FORMATS if ( fmt . name != format_name ) ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise KeyError ( ( "Image format '%s' is not registered" % format_name ) )