From 7039c53e82566705ccb570df97d0afa61f403081 Mon Sep 17 00:00:00 2001 From: pengtao Date: Tue, 5 Nov 2019 14:47:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0keys=20=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/deploy_keys.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deploy/deploy_keys.py b/deploy/deploy_keys.py index f5a452a..8b9a599 100644 --- a/deploy/deploy_keys.py +++ b/deploy/deploy_keys.py @@ -76,7 +76,6 @@ class DeployKeys: def build_svn_tar(self): try: log.info("svn export config start") - pdb.set_trace() cmd = f"cd {self.svn_paths} && svn up && tar zcvf keys.tar.gz keys " status, output = run_cmd(cmd) if status: @@ -98,7 +97,7 @@ class DeployKeys: list_dir = os.listdir(self.svn_paths) tar_files = list() for i in list_dir: - if i == "{0}.tar.gz".format(self.project) and os.path.isfile(os.path.join(self.svn_paths, i)): + if i.split('.')[-1] == "gz" and os.path.isfile(os.path.join(self.svn_paths, i)): tar_files.append(os.path.join(self.svn_paths, i)) if len(tar_files) == 1: log.info("tarfile {0} config to tar.gz success".format(self.project))