Revert file from disk

def revert(self):
        """Revert file from disk"""
        index = self.get_stack_index()
        finfo = self.data[index]
        filename = finfo.filename
        if finfo.editor.document().isModified():
            self.msgbox = QMessageBox(
                    QMessageBox.Warning,
                    self.title,
                    _("All changes to <b>%s</b> will be lost."
                      "<br>Do you want to revert file from disk?"
                      ) % osp.basename(filename),
                    QMessageBox.Yes | QMessageBox.No,
                    self)
            answer = self.msgbox.exec_()
            if answer != QMessageBox.Yes:
                return
        self.reload(index)