#NEWLINE# def __init__( self , recipe_name = None , data = None ) : #NEWLINE# #INDENT# self . recipe_name = recipe_name #NEWLINE# self . plist = Plist ( ) #NEWLINE# self . recipe = Recipe ( ) #NEWLINE# self . outputs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . base_recipe_dict = RecipeForm . get_dict_from_recipe_name ( 'base.xml' ) #NEWLINE# self . recipe_dict = RecipeForm . get_dict_from_recipe_name ( self . recipe_name ) #NEWLINE# self . plist = Plist ( self . recipe_dict ) #NEWLINE# if ( data is not None ) : #NEWLINE# #INDENT# self . outputs = self . parse_for_output ( self . base_recipe_dict , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . outputs = self . parse_for_output ( self . recipe_dict , data . outputs ) #NEWLINE# custom_plist = CustomPlist ( ) #NEWLINE# dict_iterate = dict ( self . base_recipe_dict [ 'outputs' ] , ** self . recipe_dict [ 'outputs' ] ) #NEWLINE# for ( key , value ) in dict_iterate . items ( ) : #NEWLINE# #INDENT# setattr ( custom_plist , key , self . get_value_from_post_data ( value , data ) ) #NEWLINE# #UNINDENT# self . plist . PayloadContent . append ( custom_plist ) #NEWLINE# self . plist . PayloadRemovalDisallowed = str_to_bool ( data . get ( 'PayloadRemovalDisallowed' , False ) ) #NEWLINE# self . recipe . group_name = data . get ( 'group_id' ) #NEWLINE# self . recipe . plist = self . plist