fixed unicode decode problem when printing exception

Change-Id: I2e95aa94077fe1022cb0e83581f13fc91a38c034
This commit is contained in:
cindy oneill 2014-08-22 09:44:52 -06:00
parent 9ec68587a8
commit 467b55b7fc
1 changed files with 1 additions and 3 deletions

View File

@ -24,13 +24,11 @@ import logging
import sys
from keystoneclient.v2_0 import client as ksclient
import six
import monascaclient
from monascaclient import client as monasca_client
from monascaclient.common import utils
from monascaclient import exc
from monascaclient.openstack.common import strutils
logger = logging.getLogger(__name__)
@ -430,7 +428,7 @@ def main(args=None):
if '--debug' in args or '-d' in args:
raise
else:
print(strutils.safe_encode(six.text_type(e)), file=sys.stderr)
print(e, file=sys.stderr)
sys.exit(1)
if __name__ == "__main__":