mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
SliceInfo: Adding log message and pass exception
* removes unused "e" * Using logException correctly Conflicts: plugins/SliceInfoPlugin/SliceInfo.py
This commit is contained in:
parent
6688b99cae
commit
dd02243790
1 changed files with 3 additions and 4 deletions
|
@ -84,14 +84,13 @@ class SliceInfo(Extension):
|
||||||
return # Do nothing, user does not want to send data
|
return # Do nothing, user does not want to send data
|
||||||
|
|
||||||
# Listing all files placed on the buildplate
|
# Listing all files placed on the buildplate
|
||||||
filenames = []
|
modelhashes = []
|
||||||
for node in DepthFirstIterator(CuraApplication.getInstance().getController().getScene().getRoot()):
|
for node in DepthFirstIterator(CuraApplication.getInstance().getController().getScene().getRoot()):
|
||||||
if type(node) is not SceneNode or not node.getMeshData():
|
if type(node) is not SceneNode or not node.getMeshData():
|
||||||
continue
|
continue
|
||||||
filenames.append(node.getMeshData().getFileName())
|
modelhashes.append(node.getMeshData().getHash())
|
||||||
|
|
||||||
# Creating md5sums and formatting them as discussed on JIRA
|
# Creating md5sums and formatting them as discussed on JIRA
|
||||||
modelhashes = [hashlib.md5(open(filename, 'rb').read()).hexdigest() for filename in filenames]
|
|
||||||
modelhash_formatted = ""
|
modelhash_formatted = ""
|
||||||
if modelhashes:
|
if modelhashes:
|
||||||
modelhash_formatted = str(modelhashes[0])
|
modelhash_formatted = str(modelhashes[0])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue