Skip to content

EasyRpcServer non iterable return types failing  #5

@codemation

Description

@codemation

Description

Found in easyjobs, data of only type int sent between RPC endpoints fails with the following exception:

Traceback (most recent call last):
  File "/home/tso/Documents/python/easyjobs/jobs-env/lib/python3.8/site-packages/easyrpc/server.py", line 491, in server_request
    if 'GENERATOR_START' in result:
TypeError: argument of type 'int' is not iterable
07-22 10:31 EasyRpc-server /ws/jobs ERROR    error during server_request
Traceback (most recent call last):
  File "/home/tso/Documents/python/easyjobs/jobs-env/lib/python3.8/site-packages/easyrpc/server.py", line 491, in server_request
    if 'GENERATOR_START' in result:
TypeError: argument of type 'int' is not iterable

Solution:

Check if result is iterable by inspecting for 'contains' attribute, allowing for inspection of 'GENERATOR_START' for generator detectoin

  • - Mirror Proxy implementation of iterable detection
  • - Create Unit tests to ensure values can be transported

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions