diff --git a/core/package_manager.py b/core/package_manager.py index e9246b1984d0c3a67d3f91f836353d00a037e5ff..17018df19d1a7173f8c226dacb1e76a281651e37 100755 --- a/core/package_manager.py +++ b/core/package_manager.py @@ -406,8 +406,8 @@ class OBSPkgManager(object): """ yaml_dict = {} yaml_path = os.path.join(self.init_path, "community/repository/src-openeuler.yaml") - f1 = open(yaml_path, 'r') - y = yaml.load(f1) + f1 = open(yaml_path, 'r',encoding='utf-8') + y = yaml.load(f1, Loader=yaml.FullLoader) for tmp in y['repositories']: name = tmp['name'] branch = tmp['protected_branches']