Check if attribute 'tmpfs_percentage' exist
Attribute 'tmpfs_percentage' is set only when build-pkgs is executed with argument '--tmpfs_percentage'. This change verify if attribute 'tmpfs_percentage' is set before passing it to clonechroot function. Test plan: PASS - Run build-pkgs without --tmpfs_percentage PASS - Run build-pkgs with --tmpfs_percentage Closes-bug: 2083023 Change-Id: I064328d29f0c3a2592589d0e0ac964f76bb3e5ed Signed-off-by: Dostoievski Batista <dostoievski.albinobatista@windriver.com>
This commit is contained in:
parent
b1c28c0cdb
commit
53a23581da
@ -966,7 +966,10 @@ class BuildController():
|
||||
|
||||
if 'success' in ret:
|
||||
logger.debug('Parent chroot is ready to create children chroots')
|
||||
ret_status = req_chroots_action('clonechroot', {'instances': self.attrs['parallel'], 'tmpfs_percentage': self.attrs['tmpfs_percentage']})
|
||||
extra_args = {'instances': self.attrs['parallel']}
|
||||
if hasattr(self, 'tmpfs_percentage'):
|
||||
extra_args['tmpfs_percentage'] = self.attrs['tmpfs_percentage']
|
||||
ret_status = req_chroots_action('clonechroot', extra_args)
|
||||
if not 'success' == ret_status:
|
||||
logger.error("Failed to clone children chroots")
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user