From e1ab5195423a1b51277cd136b68e51e1776d7f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 23 Jun 2016 08:07:23 +0200 Subject: [PATCH] [scm] Add logging for exporting local files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will avoid confusion when the file can not be found, but previous export from remote location worked well. In such case the log said: Exporting from SCM... Boom, no files found... This commit changes it into: Exporting from SCM... Exporting file from current working dir... Boom, no files found... Signed-off-by: Lubomír Sedlář --- pungi/wrappers/scm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pungi/wrappers/scm.py b/pungi/wrappers/scm.py index f1f13d97..f601b369 100644 --- a/pungi/wrappers/scm.py +++ b/pungi/wrappers/scm.py @@ -70,6 +70,8 @@ class ScmBase(kobo.log.LoggingBase): class FileWrapper(ScmBase): def export_dir(self, scm_root, scm_dir, target_dir, scm_branch=None, tmp_dir=None, log_file=None): + self.log_debug("Exporting directory %s from current working directory..." + % (scm_dir)) if scm_root: raise ValueError("FileWrapper: 'scm_root' should be empty.") dirs = glob.glob(scm_dir) @@ -81,6 +83,8 @@ class FileWrapper(ScmBase): def export_file(self, scm_root, scm_file, target_dir, scm_branch=None, tmp_dir=None, log_file=None): if scm_root: raise ValueError("FileWrapper: 'scm_root' should be empty.") + self.log_debug("Exporting file %s from current working directory..." + % (scm_file)) files = glob.glob(scm_file) if not files: raise RuntimeError('No files matched, can not export.')