Commit 7084eaa8 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

style fixes list_pfsync.py

(cherry picked from commit a4c5f2c7)
parent 70d95fbc
...@@ -36,9 +36,9 @@ import sys ...@@ -36,9 +36,9 @@ import sys
import ujson import ujson
if __name__ == '__main__': if __name__ == '__main__':
result = {'nodes':[]} result = {'nodes': []}
with tempfile.NamedTemporaryFile() as output_stream: with tempfile.NamedTemporaryFile() as output_stream:
subprocess.call(['/sbin/pfctl', '-s', 'state','-vv'], stdout=output_stream, stderr=open(os.devnull, 'wb')) subprocess.call(['/sbin/pfctl', '-s', 'state', '-vv'], stdout=output_stream, stderr=open(os.devnull, 'wb'))
output_stream.seek(0) output_stream.seek(0)
data = output_stream.read().strip() data = output_stream.read().strip()
if data.count('\n') > 2: if data.count('\n') > 2:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment