Created
May 1, 2018 16:59
-
-
Save trAve3113r/f2ac24dda0d9738cfe5fda3f85e9334e to your computer and use it in GitHub Desktop.
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 my_wrapper(func): | |
| try: | |
| return func | |
| except MyException as e: | |
| return "My traceback" | |
| def my_task(*args,**kwargs): | |
| yada = x + 1 | |
| return yada | |
| # primitive usage:: | |
| # learn how to write a proper wrapper in python | |
| def execute_my_task(): | |
| return my_wrapper(my_task(*args,**kwargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment