Created
September 15, 2011 19:59
-
-
Save bingomanatee/1220306 to your computer and use it in GitHub Desktop.
slipping throught exception handling with fabric
This file contains hidden or 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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For some reason the run is generating an error that even a broad-brush try/except net is not getting.