Skip to content

Instantly share code, notes, and snippets.

@mmerickel
Forked from mcdonc/gist:763155
Created January 4, 2011 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmerickel/764433 to your computer and use it in GitHub Desktop.
Save mmerickel/764433 to your computer and use it in GitHub Desktop.
def commit_veto(environ, status, headers):
for good in ('1', '2', '3'):
if status.startswith(good):
break
else:
return True
for header_name, header_value in headers:
if header_name.lower() == 'x-tm-abort':
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment