Skip to content
Snippets Groups Projects
Commit 398542b3 authored by stefan's avatar stefan
Browse files

RemoteLoader, log instead of showing messagebox when download failed

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2684 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent d85ea0b8
No related branches found
No related tags found
No related merge requests found
...@@ -141,16 +141,13 @@ class GenericLoader(BaseRemoteLoader): ...@@ -141,16 +141,13 @@ class GenericLoader(BaseRemoteLoader):
if file_type is None: if file_type is None:
file_type = self.file_type_ file_type = self.file_type_
if len(self.name_)>0: if len(self.name_)>0:
print self.name_
return url+formatted_id +"_"+self.name_+"."+file_type return url+formatted_id +"_"+self.name_+"."+file_type
else: else:
return url+formatted_id+"."+file_type return url+formatted_id+"."+file_type
def HandleError(self, message): def HandleError(self, message):
messageBox =QtGui.QMessageBox(QtGui.QMessageBox.Warning, ost.LogError(str("Could not download file\n"+message+""))
"Error while Loading file from "+self.name_, "Could not download file ("+message+")!")
messageBox.exec_()
def ToInfo(self,group): def ToInfo(self,group):
group.SetAttribute(GenericLoader.EXT_NAME_ATTRIBUTE_NAME, str(self.name_)) group.SetAttribute(GenericLoader.EXT_NAME_ATTRIBUTE_NAME, str(self.name_))
group.SetAttribute(GenericLoader.URL_ATTRIBUTE_NAME, str(self.url_)) group.SetAttribute(GenericLoader.URL_ATTRIBUTE_NAME, str(self.url_))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment