From 532c21bb0ffcc226084f573af0fae63dfba8776d Mon Sep 17 00:00:00 2001 From: yaokai13 Date: Fri, 27 Nov 2020 16:32:11 +0800 Subject: [PATCH] fix some bug in from git pull --- core/gitee_to_obs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/gitee_to_obs.py b/core/gitee_to_obs.py index 7383047..1461df7 100644 --- a/core/gitee_to_obs.py +++ b/core/gitee_to_obs.py @@ -112,6 +112,11 @@ class SYNCCode(object): if repository_exist == 'exist': pull_result = str(self.cmd.ssh_cmd('git -C %s pull' % rpm_path)[1].strip()).split("'")[1] log.info(pull_result) + pull_result_last = str(self.cmd.ssh_cmd('git -C %s pull' % rpm_path)[1].strip()).split("'")[1] + if "Already" in pull_result_last: + log.info(pull_result_last) + else: + self._git_clone(self.repository, self.gitee_branch, rpm_path) else: self._git_clone(self.repository, self.gitee_branch, rpm_path) -- Gitee