From 75bc70d1b31593bd8317cb002da6e315d9dc549a Mon Sep 17 00:00:00 2001
From: Christian Poessinger <christian@poessinger.com>
Date: Fri, 17 Apr 2020 08:29:18 +0200
Subject: flow-accounting: T2275: fix NameError: name 'stdout' is not defined

---
 src/conf_mode/flow_accounting_conf.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src')

diff --git a/src/conf_mode/flow_accounting_conf.py b/src/conf_mode/flow_accounting_conf.py
index 8c6a5490d..11df81b1d 100755
--- a/src/conf_mode/flow_accounting_conf.py
+++ b/src/conf_mode/flow_accounting_conf.py
@@ -82,11 +82,10 @@ def _iptables_get_nflog():
     for iptables_variant in ['iptables', 'ip6tables']:
         # run iptables, save output and split it by lines
         iptables_command = "sudo {0} -t {1} -S {2}".format(iptables_variant, iptables_nflog_table, iptables_nflog_chain)
-        cmd(iptables_command, message='Failed to get flows list')
-        iptables_out = stdout.splitlines()
+        tmp = cmd(iptables_command, message='Failed to get flows list')
 
         # parse each line and add information to list
-        for current_rule in iptables_out:
+        for current_rule in tmp.splitlines():
             current_rule_parsed = rule_re.search(current_rule)
             if current_rule_parsed:
                 rules.append({ 'interface': current_rule_parsed.groupdict()["interface"], 'iptables_variant': iptables_variant, 'table': iptables_nflog_table, 'rule_definition': current_rule_parsed.groupdict()["rule_definition"] })
-- 
cgit v1.2.3