# Pastebin viwrmox3 if error is not None: self.error = str(error) self.set_state(File.ERROR, update=True)