diff options
author | Ghostkeeper <rubend@tutanota.com> | 2017-05-03 15:56:52 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2017-05-03 15:56:52 +0300 |
commit | 86f1a0559f678d471d374c69397e6b3fbadc5031 (patch) | |
tree | f0dcd3f7507f9f1f3c866a74cdd185714ed3afa4 /cura/PrintInformation.py | |
parent | d95488a9401ec5f9ac20512583797ef007efa051 (diff) |
Add documentation and further specify except around disconnecting signals
Catch just a TypeError instead of all exceptions. Added documentation to say why we catch a TypeError there. Also splitted up the try-except block for the 3 disconnects, just so that if the first fails we still try to disconnect from the other two.
Contributes to issue CURA-3497.
Diffstat (limited to 'cura/PrintInformation.py')
-rw-r--r-- | cura/PrintInformation.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index cdb558b77c..ab63e4034d 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -185,7 +185,7 @@ class PrintInformation(QObject): if self._active_material_container: try: self._active_material_container.metaDataChanged.disconnect(self._onMaterialMetaDataChanged) - except TypeError: + except TypeError: #pyQtSignal gives a TypeError when disconnecting from something that is already disconnected. pass active_material_id = Application.getInstance().getMachineManager().activeMaterialId |