Add tracebacks to all failable phases

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-03-16 18:43:52 +01:00
parent c4baf51b98
commit 4afd21952c
3 changed files with 9 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import time
import pipes
import random
import shutil
import traceback
import productmd.treeinfo
from productmd.images import Image
@ -227,6 +228,8 @@ class CreateIsoThread(WorkerThread):
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)
tb = traceback.format_exc()
self.pool.log_debug(tb)
def worker(self, compose, cmd, num):
mounts = [compose.topdir]

View File

@ -20,6 +20,7 @@ import sys
import time
import pipes
import shutil
import traceback
from kobo.threads import ThreadPool, WorkerThread
from kobo.shortcuts import run, save_to_file, force_list
@ -214,6 +215,8 @@ class CreateLiveImageThread(WorkerThread):
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)
tb = traceback.format_exc()
self.pool.log_debug(tb)
def worker(self, compose, cmd, variant, arch, num):
self.basename = '%(name)s-%(version)s-%(release)s' % cmd

View File

@ -3,6 +3,7 @@
import os
import time
from kobo import shortcuts
import traceback
from pungi.util import get_variant_data, resolve_git_url, makedirs, get_mtime, get_file_size
from pungi.phases.base import PhaseBase
@ -166,6 +167,8 @@ class LiveMediaThread(WorkerThread):
msg = ('[FAIL] live-media for variant %s failed, but going on anyway.\n%s'
% (variant.uid, exc))
self.pool.log_info(msg)
tb = traceback.format_exc()
self.pool.log_debug(tb)
def _get_log_file(self, compose, variant, config):
arches = '-'.join(config['arches'])