From 0ed7167a033a86cfdbeea5c0e58e0f5dd7eb6473 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Thu, 20 Dec 2018 07:01:37 -0800 Subject: [PATCH] Make sure cancel_func is not None Related: rhbz#1656691 (cherry picked from commit ca2c3d9e7728dd4d759d50a4c66aaec12f2e7519) --- src/pylorax/creator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pylorax/creator.py b/src/pylorax/creator.py index a070170d..e39e9fae 100644 --- a/src/pylorax/creator.py +++ b/src/pylorax/creator.py @@ -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: