From 6c8901a24505bbf3595c9a7e65117e63242e7ac7 Mon Sep 17 00:00:00 2001 From: bzg1107 Date: Thu, 19 Aug 2021 10:38:45 +0800 Subject: [PATCH] netdata fix python2 not compatible with python3 --- collectors/python.d.plugin/python_modules/pyyaml3/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collectors/python.d.plugin/python_modules/pyyaml3/__init__.py b/collectors/python.d.plugin/python_modules/pyyaml3/__init__.py index a884b33..0094c3f 100644 --- a/collectors/python.d.plugin/python_modules/pyyaml3/__init__.py +++ b/collectors/python.d.plugin/python_modules/pyyaml3/__init__.py @@ -282,11 +282,12 @@ class YAMLObjectMetaclass(type): cls.yaml_loader.add_constructor(cls.yaml_tag, cls.from_yaml) cls.yaml_dumper.add_representer(cls, cls.to_yaml) -class YAMLObject(metaclass=YAMLObjectMetaclass): +class YAMLObject(object): """ An object that can dump itself to a YAML stream and load itself from a YAML stream. """ + __metaclass__ = YAMLObjectMetaclass __slots__ = () # no direct instantiation, so allow immutable subclasses -- 2.27.0