Created
September 12, 2016 13:43
-
-
Save anonymous/6eb2a7ddb062449ad671339867547f6e to your computer and use it in GitHub Desktop.
This file contains 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
import subprocess | |
def sendfail(): | |
print('Sending email') | |
def main(): | |
try: | |
subprocess.check_call(["python", "test.py"]) | |
print('Success!') | |
except subprocess.CalledProcessError: | |
sendfail() | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment