Skip to content

Instantly share code, notes, and snippets.

@bingomanatee
Created September 15, 2011 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bingomanatee/1220306 to your computer and use it in GitHub Desktop.
Save bingomanatee/1220306 to your computer and use it in GitHub Desktop.
slipping throught exception handling with fabric
def update_agi(delay=4):
prep_hosts()
print 'waiting', delay, 'seconds for agis to cycle down'
run('sleep ' + str(delay))
kill_rails_command = fab_lib.kill_rails()
print 'destroy all rails'
try:
run(kill_rails_command, False, True)
except: # this will generally throw an error if there aren't any processes.
e = sys.exc_info()[1]
print 'exception: ', e
@bingomanatee
Copy link
Author

For some reason the run is generating an error that even a broad-brush try/except net is not getting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment