diff --git a/tools/helpers.py b/tools/helpers.py index 7eaaebb..f05bc84 100644 --- a/tools/helpers.py +++ b/tools/helpers.py @@ -16,18 +16,10 @@ def run_ipset(command, *args, **kw): args=' '.join(args) ) - proc = subprocess.run( + proc = subprocess.call( shlex.split(full_command), stdout=subprocess.PIPE, - timeout=2, - check=True + timeout=2 ) - #proc = subprocess.Popen( - # shlex.split(full_command), - # stdout=subprocess.PIPE - #) - - #(output, error) = proc.communicate(timeout=2) - return proc \ No newline at end of file diff --git a/tools/manage_client.py b/tools/manage_client.py index 5a1abc8..89da3b6 100644 --- a/tools/manage_client.py +++ b/tools/manage_client.py @@ -102,7 +102,8 @@ if args.refresh: 'list', config.get('ipset', 'set_name'), '-output', - 'save' + 'save', + use_sudo=False ) for _line in proc.stdout.splitlines():