Skip to content

Commit

Permalink
Add some more debug output when we issue API calls
Browse files Browse the repository at this point in the history
  • Loading branch information
kmoore134 committed Aug 9, 2024
1 parent 9e80dfd commit ee08fe7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions share_sync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ def api_call(host, apikey, command, args, wssmode):
wssmode (bool): Optional
"""

global debug_mode

# Are we in ws:// or wss:// mode
wssprefix = "ws://"
if wssmode:
Expand All @@ -273,6 +275,8 @@ def api_call(host, apikey, command, args, wssmode):
if wssprefix == "ws://":
rtn = api_call(host, apikey, command,
args, True)
if debug_mode:
print(rtn)
return rtn
else:
print("WARNING: Failed to connect to: " + host)
Expand Down

0 comments on commit ee08fe7

Please sign in to comment.