mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-06-07 21:04:36 +00:00
modify some shell scripts to make variable references safer; modify some python scripts to reduce the code complexity and cyclomatic complexity of functions.
This commit is contained in:
@@ -47,11 +47,8 @@ class wvmNWFilter(wvmConnect):
|
||||
return ElementTree.tostring(tree).decode()
|
||||
|
||||
def get_filter_refs(self):
|
||||
refs = []
|
||||
tree = ElementTree.fromstring(self._XMLDesc(0))
|
||||
for ref in tree.findall("./filterref"):
|
||||
refs.append(ref.get("filter"))
|
||||
return refs
|
||||
return [ref.get("filter") for ref in tree.findall("./filterref")]
|
||||
|
||||
def get_rules(self):
|
||||
rules = []
|
||||
|
||||
Reference in New Issue
Block a user