We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0f958e commit 6ea06d6Copy full SHA for 6ea06d6
1 file changed
src/satosa/yaml.py
@@ -43,9 +43,21 @@ def _constructor_envfile_variables(loader, node):
43
return new_value
44
45
46
+def _constructor_tuple_variables(loader, node):
47
+ """
48
+ Extracts the tuple variable from the node's value.
49
+ :param yaml.Loader loader: the yaml loader
50
+ :param node: the current node in the yaml
51
+ :return: value of the tuple
52
53
+ return tuple(loader.construct_sequence(node))
54
+
55
56
TAG_ENV = "!ENV"
57
TAG_ENVFILE = "!ENVFILE"
58
+TAG_TUPLE = u'tag:yaml.org,2002:python/tuple'
59
60
61
_safe_loader.add_constructor(TAG_ENV, _constructor_env_variables)
62
_safe_loader.add_constructor(TAG_ENVFILE, _constructor_envfile_variables)
63
+_safe_loader.add_constructor(TAG_TUPLE, _constructor_tuple_variables)
0 commit comments