chiark
/
gitweb
/
~ianmdlvl
/
cura.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9adaafc
)
Do not assert when a firmware file is not found.
author
daid
<daid303@gmail.com>
Fri, 31 Oct 2014 13:39:01 +0000
(14:39 +0100)
committer
daid
<daid303@gmail.com>
Fri, 31 Oct 2014 13:39:01 +0000
(14:39 +0100)
Cura/util/resources.py
patch
|
blob
|
history
diff --git
a/Cura/util/resources.py
b/Cura/util/resources.py
index 6c38576398db5a26d5685c99301e0e12b465632f..59592fb173f210f83ed25536e8057deffd0543ea 100644
(file)
--- 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):