def logOn(self, chatui):
        if (not self._isConnecting) and (not self._isOnline):
            self._isConnecting = 1
            d = self._startLogOn(chatui)
            d.addCallback(self._cb_logOn)
            # if chatui is not None:
            # (I don't particularly like having to pass chatUI to this function,
            # but we haven't factored it out yet.)
            d.addCallback(chatui.registerAccountClient)
            d.addErrback(self._loginFailed)
            return d
        else:
            raise error.ConnectError("Connection in progress")
Throw exception for dangerous queries: `ALTER`, `DROP`, `TRUNCATE` if not `Administrator`.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/words/im/basesupport.py/AbstractAccount.logOn--crossover with--dataset/ETHPy150Open frappe/frappe/frappe/database.py/Database.validate_query