Avoid UnicodeEncodeError exception on exception

When an exception message contained a non-ascii
character, the str() conversion raised an UnicodeEncodeError.

Avoid this by simply passing the message itself.
Python handles the encoding to locale already.

Change-Id: I3c4440fc238d8c8136a9bd93a0040668f82bda6e
This commit is contained in:
Dirk Mueller 2013-02-06 17:24:35 +01:00
parent 7053498f3d
commit 8cc89fdfe5

@ -489,7 +489,7 @@ def main():
except Exception, e:
logger.debug(e, exc_info=1)
print >> sys.stderr, "ERROR: %s" % str(e)
print >> sys.stderr, "ERROR: %s" % e.message
sys.exit(1)