mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
increase ipset command timeout for cli tool
This commit is contained in:
parent
eddb4c0ced
commit
70c0c3049a
2 changed files with 4 additions and 2 deletions
|
@ -4,6 +4,7 @@ import shlex
|
|||
|
||||
def run_ipset(command, *args, **kw):
|
||||
use_sudo = kw.get('use_sudo', True)
|
||||
timeout = kw.get('timeout', 2)
|
||||
|
||||
if use_sudo:
|
||||
ipset_cmd = 'sudo ipset'
|
||||
|
@ -19,7 +20,7 @@ def run_ipset(command, *args, **kw):
|
|||
proc = subprocess.call(
|
||||
shlex.split(full_command),
|
||||
stdout=subprocess.PIPE,
|
||||
timeout=2
|
||||
timeout=timeout
|
||||
)
|
||||
|
||||
return proc
|
|
@ -103,7 +103,8 @@ if args.refresh:
|
|||
config.get('ipset', 'set_name'),
|
||||
'-output',
|
||||
'save',
|
||||
use_sudo=False
|
||||
use_sudo=False,
|
||||
timeout=30
|
||||
)
|
||||
|
||||
for _line in proc.stdout.splitlines():
|
||||
|
|
Loading…
Reference in a new issue