[spp] [PATCH 23/29] tools/sppc: skip checking rule file if dry run

Yasufumi Ogawa yasufum.o at gmail.com
Tue Feb 25 11:34:40 CET 2020


In l3fwd-acl container app, it checks rule file is existing even if for
--dry-run, but has no meaning. This update is disable useless checking
for --dry-run.

Signed-off-by: Yasufumi Ogawa <yasufum.o at gmail.com>
---
 tools/sppc/app/l3fwd-acl.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/sppc/app/l3fwd-acl.py b/tools/sppc/app/l3fwd-acl.py
index 11dcc85..15d0a26 100755
--- a/tools/sppc/app/l3fwd-acl.py
+++ b/tools/sppc/app/l3fwd-acl.py
@@ -209,14 +209,14 @@ def main():
         if os.path.exists(args.rule_ipv4):
             l3fwd_opts += ['--rule_ipv4', '"{:s}"'.format(args.rule_ipv4),
                            '\\']
-        else:
+        elif args.dry_run is not True:
             print('Error: "{}" does not exist'.format(args.rule_ipv4))
             exit()
     if args.rule_ipv6 is not None:
         if os.path.exists(args.rule_ipv6):
             l3fwd_opts += ['--rule_ipv6', '"{:s}"'.format(args.rule_ipv6),
                            '\\']
-        else:
+        elif args.dry_run is not True:
             print('Error: "{}" does not exist'.format(args.rule_ipv6))
             exit()
 
-- 
2.17.1



More information about the spp mailing list