def _lookup_finished(self, document, http, error): self.tagger.restore_cursor() releases = [] if error: log.error("%r", http.errorString()) else: try: releases = document['releases'] except (AttributeError, IndexError): log.error(traceback.format_exc()) dialog = CDLookupDialog(releases, self, parent=self.tagger.window) dialog.exec_()
def _lookup_finished(self, document, http, error): self.tagger.restore_cursor() releases = [] if error: self.log.error("%r", unicode(http.errorString())) else: try: releases = document.metadata[0].disc[0].release_list[0].release except (AttributeError, IndexError): self.log.error(traceback.format_exc()) dialog = CDLookupDialog(releases, self, parent=self.tagger.window) dialog.exec_()