From: daid Date: Fri, 31 Oct 2014 13:39:01 +0000 (+0100) Subject: Do not assert when a firmware file is not found. X-Git-Tag: lulzbot-14.12~36 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=923d30acee91bd21fcc868fc6dc77eba01142540;p=cura.git Do not assert when a firmware file is not found. --- 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):