@@ -351,8 +351,7 @@ def submit(self, func, resource_specification, *args, **kwargs):
351351 exec_mode = 'regular'
352352
353353 if exec_mode == 'serverless' :
354- if func .__name__ not in self ._map_func_names_to_func_details or \
355- 'func_obj' not in self ._map_func_names_to_func_details [func .__name__ ]:
354+ if func .__name__ not in self ._map_func_names_to_func_details :
356355 self ._map_func_names_to_func_details [func .__name__ ] = {'func_obj' : func }
357356 else :
358357 if id (func ) != id (self ._map_func_names_to_func_details [func .__name__ ]['func_obj' ]):
@@ -429,11 +428,10 @@ def submit(self, func, resource_specification, *args, **kwargs):
429428 # Get path to files that will contain the pickled function,
430429 # arguments, result, and map of input and output files
431430 if exec_mode == 'serverless' :
432- if func .__name__ not in self ._map_func_names_to_func_details or \
433- 'function_file' not in self ._map_func_names_to_func_details [func .__name__ ]:
431+ if 'function_file' not in self ._map_func_names_to_func_details [func .__name__ ]:
434432 function_file = os .path .join (self ._function_data_dir .name , func .__name__ , 'function' )
435- self ._map_func_names_to_func_details [func .__name__ ] = {'function_file' : function_file , 'is_serialized' : False }
436433 os .makedirs (os .path .join (self ._function_data_dir .name , func .__name__ ))
434+ self ._map_func_names_to_func_details [func .__name__ ].update ({'function_file' : function_file , 'is_serialized' : False })
437435 else :
438436 function_file = self ._map_func_names_to_func_details [func .__name__ ]['function_file' ]
439437 else :
@@ -450,7 +448,7 @@ def submit(self, func, resource_specification, *args, **kwargs):
450448 function_context_kwargs = resource_specification .get ('function_context_kwargs' , {})
451449 function_context_file = os .path .join (self ._function_data_dir .name , func .__name__ , 'function_context' )
452450 self ._serialize_object_to_file (function_context_file , [function_context , function_context_args , function_context_kwargs ])
453- self ._map_func_names_to_func_details [func .__name__ ][ 'function_context_file' ] = function_context_file
451+ self ._map_func_names_to_func_details [func .__name__ ]. update ({ 'function_context_file' : function_context_file })
454452 else :
455453 function_context_file = self ._map_func_names_to_func_details [func .__name__ ]['function_context_file' ]
456454
0 commit comments