mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-13 15:07:24 +08:00
Remove WIP print statements
This commit is contained in:
parent
0156f1e768
commit
929e2862d5
1 changed files with 0 additions and 2 deletions
|
@ -173,13 +173,11 @@ def has_random_variables(config_dict: dict) -> Tuple[bool, dict]:
|
||||||
for entry in config_dict[section].keys():
|
for entry in config_dict[section].keys():
|
||||||
if isinstance(config_dict[section][entry], str):
|
if isinstance(config_dict[section][entry], str):
|
||||||
matches = re.search(r"\${RANDOM}\[(.*)\]", config_dict[section][entry])
|
matches = re.search(r"\${RANDOM}\[(.*)\]", config_dict[section][entry])
|
||||||
print(matches)
|
|
||||||
if matches:
|
if matches:
|
||||||
try:
|
try:
|
||||||
char_quantity = int(matches.group(1))
|
char_quantity = int(matches.group(1))
|
||||||
except (ValueError, TypeError):
|
except (ValueError, TypeError):
|
||||||
char_quantity = 1
|
char_quantity = 1
|
||||||
print(random_string(char_quantity))
|
|
||||||
config_dict[section][entry] = re.sub(
|
config_dict[section][entry] = re.sub(
|
||||||
r"\${RANDOM}\[.*\]",
|
r"\${RANDOM}\[.*\]",
|
||||||
random_string(char_quantity),
|
random_string(char_quantity),
|
||||||
|
|
Loading…
Add table
Reference in a new issue