cleanup previous

This commit is contained in:
Ad Schellevis 2020-09-03 22:01:01 +02:00
parent d6bfe637da
commit d105d35cf8

View File

@ -52,8 +52,7 @@ if __name__ == '__main__':
# Test given address against tables
for table in tables:
sp = subprocess.run(['/sbin/pfctl', '-t', table, '-Ttest', sys.argv[1]], capture_output=True, text=True)
line = sp.stderr.strip()
if line.find("1/1") == 0:
if sp.stderr.strip().find("1/1") == 0:
result['matches'].append(table)
print(ujson.dumps(result))