From c9d8305002a8ce07d57ecff6759d07d421550736 Mon Sep 17 00:00:00 2001 From: Ankit R Gadiya Date: Mon, 28 Feb 2022 15:33:00 +0530 Subject: [PATCH] fix(network): makes device flag optional 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. --- riocli/device/util.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/riocli/device/util.py b/riocli/device/util.py index 0a9a5de9..0a81004b 100644 --- a/riocli/device/util.py +++ b/riocli/device/util.py @@ -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):