Created
October 28, 2013 03:50
-
-
Save beanyoung/7191183 to your computer and use it in GitHub Desktop.
query violation using api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while True: | |
if result.job_status in ['started', 'queued']: | |
sleep(result.sleep) | |
continue | |
elif result.vehicle_status == 'ok': | |
process_violation(result.violations) | |
break | |
elif result.vehicle_status == 'error': | |
# vehicle info error | |
break | |
else : | |
# unable to get violations | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment