def get_logged_in_user(self):
        """returns the logged in user
        """
        local_session = LocalSession()
        logged_in_user = local_session.logged_in_user
        if not logged_in_user:
            from anima.ui import login_dialog
            dialog = login_dialog.MainDialog(parent=self)
            dialog.exec_()
            logger.debug(dialog.DialogCode % "dialog.DialogCode: %s")

            try:
                # PySide
                accepted = QtGui.QDialog.DialogCode.Accepted
            except AttributeError:
                # PyQt4
                accepted = QtGui.QDialog.Accepted

            if dialog.DialogCode == accepted:
                local_session = LocalSession()
                logged_in_user = local_session.logged_in_user
            else:
                # close the ui
                # logged_in_user = self.get_logged_in_user()
                logger.debug("no logged in user")
                self.close()

        return logged_in_user
dataset/ETHPy150Open eoyilmaz/anima/anima/ui/base.py/AnimaDialogBase.get_logged_in_user/swapped operands of `%`