Guest User

Untitled

a guest
Nov 17th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import logging
  2.  
  3. def method():
  4. value = get_value()
  5. if value is not None:
  6. do_something()
  7. else:
  8. logging.critical("value cannot be None")
  9.  
  10. ... Mock required function and specify return values ...
  11. try:
  12. method()
  13. except Exception as ex:
  14. import traceback
  15. traceback.format_exc()
Add Comment
Please, Sign In to add comment