Cleanup code and test it
Catching object of base class Exception is a bad style. This a cause of many hidden nasty bugs.
Let's write universal function. -> Define a default return value. At least describe what will be if working_host != "local" ?
I cannot get idea behind "sys.exit(1)" .... In case of exception python will do exactly the same: print info about exception + return with value != 0.
Pull-Request has been closed by sturivny
Cleanup code and test it