Skip to content

Commit

Permalink
Make sure cancel_func is not None
Browse files Browse the repository at this point in the history
  • Loading branch information
bcl committed Jan 7, 2019
1 parent 3817671 commit ca2c3d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pylorax/creator.py
Expand Up @@ -663,7 +663,7 @@ def run_creator(opts, cancel_func=None):
log.error("squashfs.img creation failed")
raise RuntimeError("squashfs.img creation failed")

if cancel_func():
if cancel_func and cancel_func():
raise RuntimeError("ISO creation canceled")

with Mount(disk_img, opts="loop") as mount_dir:
Expand Down

0 comments on commit ca2c3d9

Please sign in to comment.