Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
guptadev21 committed Oct 18, 2024
1 parent c06eb9e commit 67b93bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions riocli/device/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@


@click.command(
'report',
"report",
cls=HelpColorsCommand,
help_headers_color=Colors.YELLOW,
help_options_color=Colors.GREEN,
)
@click.argument('device-name', type=str)
@click.argument("device-name", type=str)
@name_to_guid
@with_spinner(text="Reporting Device...")
def report_device(device_name: str, device_guid: str, spinner=None) -> None:
Expand All @@ -50,6 +50,6 @@ def report_device(device_name: str, device_guid: str, spinner=None) -> None:
spinner.text = click.style("Fail to report device.", fg=Colors.RED)
spinner.red.fail(Symbols.ERROR)

except Exception as e:
except Exception:
spinner.text = click.style("Exception occurred.", fg=Colors.RED)
spinner.red.fail(Symbols.ERROR)
6 changes: 3 additions & 3 deletions riocli/device/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ def decorated(**kwargs: typing.Any):
def report_device_api_call(device_guid: str) -> bool:
config = Configuration()
coreapi_host = config.data.get(
'core_api_host', 'https://gaapiserver.apps.okd4v2.prod.rapyuta.io'
"core_api_host", "https://gaapiserver.apps.okd4v2.prod.rapyuta.io"
)

url = '{}/api/device-manager/v0/error_handler/upload_debug_logs/{}'.format(
url = "{}/api/device-manager/v0/error_handler/upload_debug_logs/{}".format(
coreapi_host, device_guid
)

Expand All @@ -90,7 +90,7 @@ def report_device_api_call(device_guid: str) -> bool:
)

data = response.json()
if data['status'] == 'success':
if data["status"] == "success":
return True
else:
return False
Expand Down

0 comments on commit 67b93bd

Please sign in to comment.