You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
root@python-stack-server:~# snmpsim-command-responder -h
Traceback (most recent call last):
File "/usr/local/bin/snmpsim-command-responder", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/snmpsim/commands/responder.py", line 401, in main
snmp_helper.print_usage(sys.stderr)
File "/usr/lib/python3.5/argparse.py", line 2362, in print_usage
self._print_message(self.format_usage(), file)
File "/usr/lib/python3.5/argparse.py", line 2328, in format_usage
return formatter.format_help()
File "/usr/lib/python3.5/argparse.py", line 287, in format_help
help = self._root_section.format_help()
File "/usr/lib/python3.5/argparse.py", line 217, in format_help
func(*args)
File "/usr/lib/python3.5/argparse.py", line 338, in _format_usage
assert ' '.join(opt_parts) == opt_usage
AssertionError
root@python-stack-server:~# snmpsim-command-responder -h
Traceback (most recent call last):
File "/usr/local/bin/snmpsim-command-responder", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/snmpsim/commands/responder.py", line 401, in main
snmp_helper.print_usage(sys.stderr)
File "/usr/lib/python3.5/argparse.py", line 2362, in print_usage
self._print_message(self.format_usage(), file)
File "/usr/lib/python3.5/argparse.py", line 2328, in format_usage
return formatter.format_help()
File "/usr/lib/python3.5/argparse.py", line 287, in format_help
help = self._root_section.format_help()
File "/usr/lib/python3.5/argparse.py", line 217, in format_help
func(*args)
File "/usr/lib/python3.5/argparse.py", line 338, in _format_usage
assert ' '.join(opt_parts) == opt_usage
AssertionError
some code in argparse.py:
part_regexp = r'(.?)+|[.?]+|\S+'
opt_usage = format(optionals, groups)
pos_usage = format(positionals, groups)
opt_parts = _re.findall(part_regexp, opt_usage)
pos_parts = _re.findall(part_regexp, pos_usage)
error point :
assert ' '.join(opt_parts) == opt_usage
assert ' '.join(pos_parts) == pos_usage
reason:
the re "part_regexp " split args error when double "[[]]" in some string like "[--logging-method =<syslog|null|stderr|file|stdout[:args]>]]".
The text was updated successfully, but these errors were encountered: