Skip to content

Instantly share code, notes, and snippets.

@beanyoung
Created October 28, 2013 03:50
Show Gist options
  • Save beanyoung/7191183 to your computer and use it in GitHub Desktop.
Save beanyoung/7191183 to your computer and use it in GitHub Desktop.
query violation using api
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