CLI for save_failed_tree

This commit is contained in:
Tomas Kopecek 2016-10-26 12:52:19 +02:00 committed by Mike McLean
parent a5131cec91
commit 437afbb720
5 changed files with 182 additions and 3 deletions

View file

@ -6,6 +6,7 @@ from __main__ import BuildRoot
__all__ = ('SaveFailedTreeTask',)
def omit_ccache(tarinfo):
if fnmatch.fnmatch(tarinfo.name, '*/tmp/krb5cc') or \
fnmatch.fnmatch(tarinfo.name, '*/etc/*.keytab'):
@ -14,12 +15,10 @@ def omit_ccache(tarinfo):
return tarinfo
class SaveFailedTreeTask(tasks.BaseTaskHandler):
Methods = ['saveFailedTree']
_taskWeight = 3.0
def handler(self, taskID, full=False):
self.logger.debug("Starting saving buildroots for task %d [full=%s]" % (taskID, full))
tar_path = os.path.join(self.workdir, 'broots-task-%s.tar.gz' % taskID)