diff --git a/invoke/vendor/yaml/constructor.py b/invoke/vendor/yaml/constructor.py index 619acd307..733c329be 100644 --- a/invoke/vendor/yaml/constructor.py +++ b/invoke/vendor/yaml/constructor.py @@ -413,6 +413,10 @@ def construct_yaml_map(self, node): value = self.construct_mapping(node) data.update(value) + def construct_yaml_join(self, node): + seq = self.construct_sequence(node) + return ''.join([str(i) for i in seq]) + def construct_yaml_object(self, node, cls): data = cls.__new__(cls) yield data @@ -476,6 +480,10 @@ def construct_undefined(self, node): 'tag:yaml.org,2002:map', SafeConstructor.construct_yaml_map) +SafeConstructor.add_constructor( + '!join', + SafeConstructor.construct_yaml_join) + SafeConstructor.add_constructor(None, SafeConstructor.construct_undefined)