tools: pack: exit with error code when pack fails

change print to exit with error code so that we know
when an image packing fails

Change-Id: I55b791c226de1c6b2d40c4886a43b301c58aa644
Signed-off-by: Saravanan Jaganathan <sjaganat@codeaurora.org>
This commit is contained in:
Saravanan Jaganathan 2020-05-04 19:44:34 +05:30 committed by Gerrit - the friendly Code Review server
parent 8027a7fcf0
commit e3cb69348b

View file

@ -1657,7 +1657,7 @@ class Pack(object):
self.__mkimage(images)
else:
fail_img = out_fname.split("/")
print "Failed to pack %s" % fail_img[-1]
error("Failed to pack %s" % fail_img[-1])
class UsageError(Exception):
"""Indicates error in command arguments."""