

def _wait_for_modem(self):
    '\n        Blocks until this backend has connected to and initialized the modem,\n        waiting for a maximum of self.MAX_CONNECT_TIME (default=10) seconds.\n        Returns true when modem is ready, or false if it times out.\n        '
    for n in range(0, (self.MAX_CONNECT_TIME * 10)):
        if (self.modem is not None):
            return True
        time.sleep(0.1)
    self.warning('Timed out while waiting for modem')
    return False

dataset/ETHPy150Open rapidsms/rapidsms-core-dev/lib/rapidsms/backends/gsm.py Backend._wait_for_modem/original