Skip to content
Browse files

Cope with unicode characters in exceptions

  • Loading branch information...
1 parent c1790ee commit 628c9211bee8b84a69c0fe1473308980067b542c @talex5 talex5 committed Apr 29, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 0compile
View
5 0compile
@@ -92,6 +92,9 @@ except UsageError, ex:
sys.exit(1)
except SafeException, ex:
if options.verbose: raise
- print >>sys.stderr, str(ex)
+ try:
+ print >>sys.stderr, unicode(ex)
+ except:
+ print >>sys.stderr, repr(ex)
sys.exit(1)

0 comments on commit 628c921

Please sign in to comment.
Something went wrong with that request. Please try again.