Bugfix in logging when trying to import broken profile. CURA-787

This commit is contained in:
Jack Ha 2016-10-20 11:39:01 +02:00
parent fd50d9e316
commit d4f7a0e16c
37 changed files with 307 additions and 4 deletions

View file

@ -165,7 +165,7 @@ class CuraContainerRegistry(ContainerRegistry):
profile_or_list = profile_reader.read(file_name) # Try to open the file with the profile reader.
except Exception as e:
# Note that this will fail quickly. That is, if any profile reader throws an exception, it will stop reading. It will only continue reading if the reader returned None.
Logger.log("e", "Failed to import profile from %s: %s while using profile reader", file_name, str(e), profile_reader.getPluginId())
Logger.log("e", "Failed to import profile from %s: %s while using profile reader [%s]", file_name, str(e), profile_reader.getPluginId())
return { "status": "error", "message": catalog.i18nc("@info:status", "Failed to import profile from <filename>{0}</filename>: <message>{1}</message>", file_name, str(e))}
if profile_or_list: # Success!
name_seed = os.path.splitext(os.path.basename(file_name))[0]