Skip to content

Commit

Permalink
fix(network): makes device flag optional
Browse files Browse the repository at this point in the history
The device_name_to_guid decorator only worked if device_name is present.
This assumption is correct for all the device sub-commands where
device_name is the argument.

In Network though, device_name is only required for device networks. So,
this commit adds the check to name device_name optional in the
decorator.
  • Loading branch information
ankitrgadiya committed Mar 15, 2022
1 parent 71187ab commit c9d8305
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions riocli/device/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ def decorated(**kwargs: typing.Any):
exit(1)

name = kwargs.pop('device_name')

# device_name is not specified
if name is None:
f(**kwargs)
return

guid = None

if is_valid_uuid(name):
Expand Down

0 comments on commit c9d8305

Please sign in to comment.