Skip to content

Instantly share code, notes, and snippets.

@hub-cap
Created November 26, 2013 01:14
Show Gist options
  • Save hub-cap/7651859 to your computer and use it in GitHub Desktop.
Save hub-cap/7651859 to your computer and use it in GitHub Desktop.
- return instance.save()
+ try:
+ return instance.save()
+ except TypeError:
+ import traceback, sys
+ exc_type, exc_value, exc_traceback = sys.exc_info()
+ traceback.print_tb(exc_traceback, limit=1, file=sys.stdout)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment