Skip to content
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

osc_sdk/sdk.py: Change api_connect return format #48

Open
pitouche opened this issue Jul 1, 2020 · 0 comments
Open

osc_sdk/sdk.py: Change api_connect return format #48

pitouche opened this issue Jul 1, 2020 · 0 comments

Comments

@pitouche
Copy link

pitouche commented Jul 1, 2020

Hello, while using the function api_connect,

We where puzzled to have the answer printed to stdout, instead of a good python variable

Here is what we did to get something usable:
diff --git a/osc_sdk/sdk.py b/osc_sdk/sdk.py
index 16f4637..b81c769 100644
--- a/osc_sdk/sdk.py
+++ b/osc_sdk/sdk.py
@@ -538,7 +538,7 @@ def api_connect(service, call, profile='default', *args, **kwargs):
handler = callsservice
handler.make_request(call, *args, **kwargs)
if handler.response:

  •    print(json.dumps(handler.response, indent=4))
    
  •    return handler.response
    

def main():

Is it possible to have this fix in the master branch ?

Thanks in advances.

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

No branches or pull requests

1 participant