mirror of
https://github.com/borgmatic-collective/borgmatic.git
synced 2026-08-03 07:03:00 +02:00
Fix argument parsing to avoid using Python 3.12+ string features (#1057).
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2.0.1
|
||||
* #1057: Fix argument parsing to avoid using Python 3.12+ string features. Now borgmatic will
|
||||
work with Python 3.9, 3.10, and 3.11 again.
|
||||
|
||||
2.0.0
|
||||
* TL;DR: More flexible, completely revamped command hooks. All configuration options settable on
|
||||
the command-line. New configuration options for many command-line flags (including verbosity!).
|
||||
|
||||
@@ -357,7 +357,7 @@ def add_array_element_arguments(arguments_group, unparsed_arguments, flag_name):
|
||||
if '[0]' not in flag_name or not unparsed_arguments or '--help' in unparsed_arguments:
|
||||
return
|
||||
|
||||
pattern = re.compile(fr'^--{flag_name.replace("[0]", r"\[\d+\]").replace(".", r"\.")}$')
|
||||
pattern = re.compile('^--' + flag_name.replace('[0]', r'\[\d+\]').replace('.', r'\.') + '$')
|
||||
|
||||
try:
|
||||
# Find an existing list index flag (and its action) corresponding to the given flag name.
|
||||
|
||||
Reference in New Issue
Block a user