Skip to content

Instantly share code, notes, and snippets.

@sajal
Created January 8, 2012 15:40
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 sajal/1578744 to your computer and use it in GitHub Desktop.
Save sajal/1578744 to your computer and use it in GitHub Desktop.
Dont give up
def do_task():
"""
Customise this
"""
this_will_always_fail()
def attempt_task():
try:
do_task()
print "Success at last!"
except:
attempt_task()
if __name__ == "__main__":
attempt_task()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment