pack: Add check to remove tmp directory only if it exists

Change-Id: Id0d2fc419a632d4bc24258d636285348db82d15b
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
This commit is contained in:
Pavithra Palanisamy 2019-01-29 18:01:27 +05:30
parent d917f0032a
commit e4c52487fd

View file

@ -1235,7 +1235,10 @@ class Pack(object):
images.insert(0, ImageInfo("script", "flash.scr", "script"))
self.__mkimage(images)
rmtree(self.tmp_dir)
"""Remove tmp_dir,if created earlier for lk-kernelboot image generation"""
if os.path.exists(self.images_dname + "tmp_dir"):
rmtree(self.images_dname + "tmp_dir")
def main(self, flinfo, images_dname, out_fname, part_fname, fconf_fname, ipq_nand):
"""Start the packing process.