From 2ee392eefffde77ebdf83f5e4e0c43cf8c1a7d6e Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Wed, 6 Nov 2019 21:09:09 -0800 Subject: [PATCH] add quiet mode --- jc/parsers/netstat2.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/jc/parsers/netstat2.py b/jc/parsers/netstat2.py index 9b33c324..6dfeb1c6 100644 --- a/jc/parsers/netstat2.py +++ b/jc/parsers/netstat2.py @@ -8,7 +8,7 @@ Limitations: for lines with spaces in the program_name """ import string -import jc +from jc.utils import * def process(proc_data): @@ -87,10 +87,12 @@ def parse_post(raw_data): return raw_data -def parse(data, raw=False): +def parse(data, raw=False, quiet=False): # compatible options: linux, darwin, cygwin, win32, aix, freebsd - jc.jc.compatibility(__name__, - ['linux']) + compatible = ['linux'] + + if not quiet: + compatibility(__name__, compatible) cleandata = data.splitlines() raw_output = []