We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 004b84a commit daa8e80Copy full SHA for daa8e80
filter_plugins/rules.py
@@ -37,7 +37,11 @@ def nftables_format_list(cls, data: list) -> str:
37
38
@classmethod
39
def nftables_format_var(cls, key: str, value: (str, list)) -> str:
40
- return f"define { cls.nftables_safe_name(key) } = {cls.nftables_format_list(value)}"
+ if isinstance(value, list):
41
+ return f"define {cls.nftables_safe_name(key)} = {cls.nftables_format_list(value)}"
42
+
43
+ else:
44
+ return f"define {cls.nftables_safe_name(key)} = {value}"
45
46
47
def _translate_rule(
0 commit comments