Skip to content

Commit

Permalink
add variable-appendix to only contain a single IP
Browse files Browse the repository at this point in the history
  • Loading branch information
superstes committed Dec 19, 2024
1 parent 80f7f6b commit 105b054
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ def format_var(name: str, data: list, version: int, fallback: str = None) -> str
if version not in FALLBACK_VAR_VALUE:
version = 4

if name.endswith(VAR_SINGLE_END) and len(data) > 0:
data = [data[0]]

append = APPENDIX_4 if version == 4 else APPENDIX_6

if append not in [None, ' ', '']:
name = f'{name}_{append}'

if name.endswith(VAR_SINGLE_END) and len(data) > 0:
data = data[0]

if len(data) > 1:
raw = f"define { name } = {{ %s }}"

Expand Down

0 comments on commit 105b054

Please sign in to comment.