Skip to content

Commit d99d68c

Browse files
committed
security_group: Use execute() function instead of non-existing bash()
In 6233a77 as a part of PR #2432 the bash() function was replaced by the execute() function. Somehow this last calling of the bash() function was not caught by testing and is still in there. This causes Exceptions to be thrown by the Security Group script. Signed-off-by: Wido den Hollander <[email protected]>
1 parent 85ad285 commit d99d68c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/vm/network/security_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,8 +1151,8 @@ def getvmId(vmName):
11511151

11521152
def getBrfw(brname):
11531153
cmd = "iptables-save |grep physdev-is-bridged |grep FORWARD |grep BF |grep '\-o' | grep -w " + brname + "|awk '{print $9}' | head -1"
1154-
brfwname = bash("-c", cmd).stdout.strip()
1155-
if brfwname == "":
1154+
brfwname = execute(cmd).strip()
1155+
if not brfwname:
11561156
brfwname = "BF-" + brname
11571157
return brfwname
11581158

0 commit comments

Comments
 (0)