You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 10, 2024. It is now read-only.
There is a bug in swagger-codegen where it's using variable names that are reserved words in python3.7. Specifically, async is a reserved word. The result is a series of syntax error like this:
byte-compiling build/bdist.macosx-10.9-x86_64/egg/rapid7vmconsole/api_client.py to api_client.cpython-37.pyc
File "build/bdist.macosx-10.9-x86_64/egg/rapid7vmconsole/api_client.py", line 277
response_type=None, auth_settings=None, async=None,
^
SyntaxError: invalid syntax
Until swagger-codegen is fixed, a work-around is to run the following on the vm-console-client-python code on a linux/unix/osx machine:
LC_ALL=C find ./ -type f -exec sed -i ‘’ ‘s/async=params.get/async_=params.get/g’ {} +
LC_ALL=C find ./ -type f -exec sed -i ‘’ ‘s/async=None/async_=None/g’ {} +
LC_ALL=C find ./ -type f -exec sed -i ‘’ ‘s/if not async/if not async_/g’ {} +
This replaces the async variable with async_ and allows the code to be compatible with python3.7
There is a bug in swagger-codegen where it's using variable names that are reserved words in python3.7. Specifically, async is a reserved word. The result is a series of syntax error like this:
Until swagger-codegen is fixed, a work-around is to run the following on the vm-console-client-python code on a linux/unix/osx machine:
LC_ALL=C find ./ -type f -exec sed -i ‘’ ‘s/async=params.get/async_=params.get/g’ {} +
LC_ALL=C find ./ -type f -exec sed -i ‘’ ‘s/async=None/async_=None/g’ {} +
LC_ALL=C find ./ -type f -exec sed -i ‘’ ‘s/if not async/if not async_/g’ {} +
This replaces the async variable with async_ and allows the code to be compatible with python3.7