New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping over an empty list should return an empty list #129

Closed
Vaishaal opened this Issue Apr 18, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@Vaishaal
Collaborator

Vaishaal commented Apr 18, 2017

This is super dumb but mapping over an empty list shouldn't throw an exception. It should just return an empty list.

pwex.map(lambda x: x, [])


UnboundLocalError Traceback (most recent call last)
in ()
----> 1 pwex.map(lambda x: x, [])

/home/ubuntu/pywren/pywren/executor.py in map(self, func, iterdata, extra_env, extra_meta, invoke_pool_threads, data_all_as_one, use_cached_runtime, overwrite_invoke_args, exclude_modules)
281 pool.close()
282 pool.join()
--> 283 logger.info("map invoked {} {} pool join".format(callset_id, call_id))
284
285 # FIXME take advantage of the callset to return a lot of these

UnboundLocalError: local variable 'call_id' referenced before assignment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment