#NEWLINE# @ osbsapi #NEWLINE# def get_compression_extension( self ) : #NEWLINE# #INDENT# "\n        Find the filename extension for the 'docker save' output, which\n        may or may not be compressed.\n\n        Raises OsbsValidationException if the extension cannot be\n        determined due to a configuration error.\n\n        :returns: str including leading dot, or else None if no compression\n        " #NEWLINE# build_type = self . build_conf . get_build_type ( ) #NEWLINE# build_request = self . bm . get_build_request_by_type ( build_type = build_type ) #NEWLINE# inner = build_request . inner_template #NEWLINE# postbuild_plugins = inner . get ( 'postbuild_plugins' , [ ] ) #NEWLINE# for plugin in postbuild_plugins : #NEWLINE# #INDENT# if ( plugin . get ( 'name' ) == 'compress' ) : #NEWLINE# #INDENT# args = plugin . get ( 'args' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# method = args . get ( 'method' , 'gzip' ) #NEWLINE# if ( method == 'gzip' ) : #NEWLINE# #INDENT# return '.gz' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( method == 'lzma' ) : #NEWLINE# #INDENT# return '.xz' #NEWLINE# #UNINDENT# #UNINDENT# raise OsbsValidationException ( ( "unknown compression method '%s'" % method ) ) #NEWLINE# #UNINDENT# #UNINDENT# return None