import checkNetif __name__ == '__main__': stage, state = checkNet.waitNetworkReady(30) if stage == 3 and state == 1: print('Network connection successful.') else: print('Network connection failed, stage={}, state={}'.format(stage, state))