diff mbox series

[nft,7/8] tests/py: minor cleaning

Message ID 20180618115128.20920-8-eric@regit.org
State Changes Requested
Delegated to: Pablo Neira
Headers show
Series python install and build fixes | expand

Commit Message

Eric Leblond June 18, 2018, 11:51 a.m. UTC
Move import and use explicit parameter in object creation.
---
 tests/py/nft-test.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py
index c02294a..cbdff98 100755
--- a/tests/py/nft-test.py
+++ b/tests/py/nft-test.py
@@ -18,6 +18,7 @@  import os
 import argparse
 import signal
 import json
+from nftables import Nftables
 
 TESTS_PATH = os.path.dirname(os.path.abspath(__file__))
 TESTS_DIRECTORY = ["any", "arp", "bridge", "inet", "ip", "ip6"]
@@ -1329,7 +1330,6 @@  def main():
     os.chdir(TESTS_PATH + "/../..")
 
     sys.path.append('py/')
-    from nftables import Nftables
 
     if not os.path.exists('src/.libs/libnftables.so'):
         print "The nftables library does not exist. " \
@@ -1337,7 +1337,7 @@  def main():
         return
 
     global nftables
-    nftables = Nftables('src/.libs/libnftables.so')
+    nftables = Nftables(sofile = 'src/.libs/libnftables.so')
 
     test_files = files_ok = run_total = 0
     tests = passed = warnings = errors = 0