mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Use parse_known_args when checking iptables rules
This will allow use of iptables custom extensions Fixes #50014
This commit is contained in:
parent
15f86b2c69
commit
e552e4f268
@ -1026,11 +1026,8 @@ def _parse_conf(conf_file=None, in_mem=False, family='ipv4'):
|
||||
if args[-1].startswith('-'):
|
||||
args.append('')
|
||||
parsed_args = []
|
||||
if sys.version.startswith('2.6'):
|
||||
(opts, leftover_args) = parser.parse_args(args)
|
||||
parsed_args = vars(opts)
|
||||
else:
|
||||
parsed_args = vars(parser.parse_args(args))
|
||||
opts, _ = parser.parse_known_args(args)
|
||||
parsed_args = vars(opts)
|
||||
ret_args = {}
|
||||
chain = parsed_args['append']
|
||||
for arg in parsed_args:
|
||||
|
Loading…
Reference in New Issue
Block a user