Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import logging
- def method():
- value = get_value()
- if value is not None:
- do_something()
- else:
- logging.critical("value cannot be None")
- ... Mock required function and specify return values ...
- try:
- method()
- except Exception as ex:
- import traceback
- traceback.format_exc()
Add Comment
Please, Sign In to add comment