mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
lf_json_autogen.py: fixes warning about possibly undeclared variable
Signed-off-by: Jed Reynolds <jed@candelatech.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
|
||||
Generated by LANforge JsonApiPythonGenerator, Fri Sep 10 14:30:41 PDT 2021
|
||||
Generated by LANforge JsonApiPythonGenerator, Fri Sep 10 14:38:00 PDT 2021
|
||||
- - WORK IN PROGRESS - -
|
||||
The API this library provides is actively being changed.
|
||||
This file expects to live in py-json/LANforge directory.
|
||||
@@ -2389,7 +2389,7 @@ class LFJsonPost(LFCliBase):
|
||||
@staticmethod
|
||||
def set_flags(flag_class: IntFlag, starting_value: int, flag_names=None):
|
||||
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
|
||||
Example Usage:
|
||||
Example Usage:
|
||||
value = LFJsonPost.add_flags(SetPortMumble, 0, flag_names=['bridge', 'dhcp'])
|
||||
print('value now: '+value)
|
||||
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
|
||||
@@ -2434,6 +2434,7 @@ class LFJsonPost(LFCliBase):
|
||||
raise ValueError("starting_value should be an integer greater than zero and not None")
|
||||
if not flag_names:
|
||||
raise ValueError("flag_names should be a name or a list of names, not None")
|
||||
unselected_val = None
|
||||
if type(flag_names) is list:
|
||||
unselected_val = starting_value
|
||||
for flag in flag_names:
|
||||
|
||||
Reference in New Issue
Block a user