def set_up_network(): print('trying to set up network with provided username and password') got_acess = use_access_point() if not got_acess: profile.connect_button['spinning'] = False profile.connect_button['disabled'] = False profile.connect_button['active'] = False print('should now be returning fail could not bring up interface at all') return print('testing if network setup worked using ping') if test_access(): profile.connect_button['active'] = True profile.connect_button['spinning'] = False profile.connect_button['disabled'] = False print('we should now be connected') status = profile.export() else: profile.connect_button['spinning'] = False profile.connect_button['disabled'] = False profile.connect_button['active'] = False print('should now be returning fail ping test did not work')
def get_status(): update_data() status = profile.export() profile.save_state() return json.dumps(status)