Make sure cancel_func is not None
Related: rhbz#1656691
(cherry picked from commit ca2c3d9e77
)
This commit is contained in:
parent
47eecdfc85
commit
0ed7167a03
@ -663,7 +663,7 @@ def run_creator(opts, cancel_func=None):
|
|||||||
log.error("squashfs.img creation failed")
|
log.error("squashfs.img creation failed")
|
||||||
raise RuntimeError("squashfs.img creation failed")
|
raise RuntimeError("squashfs.img creation failed")
|
||||||
|
|
||||||
if cancel_func():
|
if cancel_func and cancel_func():
|
||||||
raise RuntimeError("ISO creation canceled")
|
raise RuntimeError("ISO creation canceled")
|
||||||
|
|
||||||
with Mount(disk_img, opts="loop") as mount_dir:
|
with Mount(disk_img, opts="loop") as mount_dir:
|
||||||
|
Loading…
Reference in New Issue
Block a user