Skip to content

Commit 6678c37

Browse files
Guillaume G.nvlsianpu
authored andcommitted
imgtool: dumpinfo: Avoid exit and use return
Signed-off-by: Guillaume G. <[email protected]>
1 parent 091af82 commit 6678c37

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

scripts/imgtool/dumpinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def dump_imginfo(imgfile, outfile=None, silent=False):
251251
###############################################################################
252252

253253
if silent:
254-
sys.exit(0)
254+
return
255255

256256
print("Printing content of signed image:", os.path.basename(imgfile), "\n")
257257

scripts/imgtool/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def verify(key, imgfile):
259259
'of a signed image')
260260
def dumpinfo(imgfile, outfile, silent):
261261
dump_imginfo(imgfile, outfile, silent)
262-
print("dumpinfo has run successfully")
262+
if not silent:
263+
print("dumpinfo has run successfully")
263264

264265

265266
def validate_version(ctx, param, value):

0 commit comments

Comments
 (0)