From d661de3e737c31167af161d15a3fb839070ade4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Mon, 8 Feb 2016 12:06:47 +0100 Subject: [PATCH] Log more details about failed deliverable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- pungi/phases/createiso.py | 6 +++--- pungi/phases/image_build.py | 6 +++--- pungi/phases/live_images.py | 6 +++--- pungi/phases/livemedia_phase.py | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pungi/phases/createiso.py b/pungi/phases/createiso.py index 707bb656..bf582f9d 100644 --- a/pungi/phases/createiso.py +++ b/pungi/phases/createiso.py @@ -220,12 +220,12 @@ class CreateIsoThread(WorkerThread): compose, cmd, variant, arch = item try: self.worker(compose, cmd, num) - except Exception: + except Exception as exc: if not compose.can_fail(variant, arch, 'iso'): raise else: - msg = ('[FAIL] Creating iso for variant %s, arch %s failed, but going on anyway.' - % (variant.uid, arch)) + msg = ('[FAIL] Creating iso for variant %s, arch %s failed, but going on anyway.\n%s' + % (variant.uid, arch, exc)) self.pool.log_info(msg) def worker(self, compose, cmd, num): diff --git a/pungi/phases/image_build.py b/pungi/phases/image_build.py index 8a4a078f..6d2dcab8 100644 --- a/pungi/phases/image_build.py +++ b/pungi/phases/image_build.py @@ -144,12 +144,12 @@ class CreateImageBuildThread(WorkerThread): compose, cmd = item try: self.worker(num, compose, cmd) - except: + except Exception as exc: if not compose.can_fail(cmd['image_conf']['variant'], '*', 'image-build'): raise else: - msg = ('[FAIL] image-build for variant %s failed, but going on anyway.' - % cmd['image_conf']['variant']) + msg = ('[FAIL] image-build for variant %s failed, but going on anyway.\n%s' + % (cmd['image_conf']['variant'], exc)) self.pool.log_info(msg) def worker(self, num, compose, cmd): diff --git a/pungi/phases/live_images.py b/pungi/phases/live_images.py index 3f7225e4..ab96ab76 100644 --- a/pungi/phases/live_images.py +++ b/pungi/phases/live_images.py @@ -172,12 +172,12 @@ class CreateLiveImageThread(WorkerThread): compose, cmd, variant, arch = item try: self.worker(compose, cmd, variant, arch, num) - except: + except Exception as exc: if not compose.can_fail(variant, arch, 'live'): raise else: - msg = ('[FAIL] Creating live image for variant %s, arch %s failed, but going on anyway.' - % (variant.uid, arch)) + msg = ('[FAIL] Creating live image for variant %s, arch %s failed, but going on anyway.\n%s' + % (variant.uid, arch, exc)) self.pool.log_info(msg) def worker(self, compose, cmd, variant, arch, num): diff --git a/pungi/phases/livemedia_phase.py b/pungi/phases/livemedia_phase.py index ddb8fefa..e1996cfa 100644 --- a/pungi/phases/livemedia_phase.py +++ b/pungi/phases/livemedia_phase.py @@ -99,12 +99,12 @@ class LiveMediaThread(WorkerThread): self.num = num try: self.worker(compose, variant, config) - except: + except Exception as exc: if not compose.can_fail(variant, '*', 'live-media'): raise else: - msg = ('[FAIL] live-media for variant %s failed, but going on anyway.' - % variant.uid) + msg = ('[FAIL] live-media for variant %s failed, but going on anyway.\n%s' + % (variant.uid, exc)) self.pool.log_info(msg) def _get_log_file(self, compose, variant, config):