Skip to content
This repository was archived by the owner on Jul 20, 2026. It is now read-only.
This repository was archived by the owner on Jul 20, 2026. It is now read-only.

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

Open

Description

@pitouche

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions