From 923d30acee91bd21fcc868fc6dc77eba01142540 Mon Sep 17 00:00:00 2001 From: daid Date: Fri, 31 Oct 2014 14:39:01 +0100 Subject: [PATCH] Do not assert when a firmware file is not found. --- Cura/util/resources.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cura/util/resources.py b/Cura/util/resources.py index 6c385763..59592fb1 100644 --- a/Cura/util/resources.py +++ b/Cura/util/resources.py @@ -32,7 +32,8 @@ else: def getPathForResource(dir, subdir, resource_name): assert os.path.isdir(dir), "{p} is not a directory".format(p=dir) path = os.path.normpath(os.path.join(dir, subdir, resource_name)) - assert os.path.isfile(path), "{p} is not a file.".format(p=path) + if not os.path.isfile(path): + return None return path def getPathForImage(name): -- 2.30.2