From 1899c01464679db81ead2e0dbd2705f5d014d6cb Mon Sep 17 00:00:00 2001 From: wangchong1995924 <15229716099@163.com> Date: Wed, 24 Feb 2021 10:53:32 +0800 Subject: [PATCH] fix a error --- core/package_manager.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/package_manager.py b/core/package_manager.py index 990f9bc..e005c6b 100755 --- a/core/package_manager.py +++ b/core/package_manager.py @@ -253,7 +253,7 @@ class OBSPkgManager(object): self._del_pkg(proj, pkg) self._add_pkg(new_proj, pkg, branch_name) - def _sync_pkg_code(self, proj, pkg): + def _sync_pkg_code(self, proj, pkg, branch_name): """ when adding a new package to a project, sync code """ @@ -261,6 +261,7 @@ class OBSPkgManager(object): log.info("Start synchronization code...") self.kwargs['project'] = proj self.kwargs['repository'] = pkg + self.kwargs['branch'] = branch_name sy = SYNCCode(**self.kwargs) sy.sync_code_to_obs() @@ -355,7 +356,7 @@ class OBSPkgManager(object): if msg["log_type"] == "Add-pkg": if msg["exist_flag"] == 0: self._add_pkg(msg["proj"], msg["pkg"], msg["branch_name"]) - self._sync_pkg_code(msg["proj"], msg["pkg"]) + self._sync_pkg_code(msg["proj"], msg["pkg"], msg["branch_name"]) elif msg["log_type"] == "Del-pkg": self._del_pkg(msg["proj"], msg["pkg"]) elif msg["log_type"] == "Del-pkg-service": @@ -445,7 +446,7 @@ class OBSPkgManager(object): if len(need_add): for pkgname in list(need_add): self._add_pkg(proj, pkgname, meta_pb_dict[proj]) - self._sync_pkg_code(proj, pkgname) + self._sync_pkg_code(proj, pkgname, meta_pb_dict[proj]) if len(need_del): for pkgname in list(need_del): self._del_pkg(proj, pkgname) -- Gitee