def main():
    ' main function '
    arg = get_args()
    if (arg.log == 'debug'):
        set_up_logging()
    units = arg.unit
    api_key = get_api_key()
    city_id = get_city_id()
    while True:
        try:
            update_weather(city_id, units, api_key)
        except MyInternetIsShitty:
            logging.info(cb('update failed: ', 'red'))
            time.sleep(3)
        else:
            logging.info(cb('update success', 'green'))
            time.sleep(700)
main function
def main():
    '  '
    arg = get_args()
    if (arg.log == 'debug'):
        set_up_logging()
    units = arg.unit
    api_key = get_api_key()
    city_id = get_city_id()
    while True:
        try:
            update_weather(city_id, units, api_key)
        except MyInternetIsShitty:
            logging.info(cb('update failed: ', 'red'))
            time.sleep(3)
        else:
            logging.info(cb('update success', 'green'))
            time.sleep(700)