fixed unicode decode problem when printing exception
Change-Id: I2e95aa94077fe1022cb0e83581f13fc91a38c034
This commit is contained in:
parent
9ec68587a8
commit
467b55b7fc
|
@ -24,13 +24,11 @@ import logging
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from keystoneclient.v2_0 import client as ksclient
|
from keystoneclient.v2_0 import client as ksclient
|
||||||
import six
|
|
||||||
|
|
||||||
import monascaclient
|
import monascaclient
|
||||||
from monascaclient import client as monasca_client
|
from monascaclient import client as monasca_client
|
||||||
from monascaclient.common import utils
|
from monascaclient.common import utils
|
||||||
from monascaclient import exc
|
from monascaclient import exc
|
||||||
from monascaclient.openstack.common import strutils
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -430,7 +428,7 @@ def main(args=None):
|
||||||
if '--debug' in args or '-d' in args:
|
if '--debug' in args or '-d' in args:
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
print(strutils.safe_encode(six.text_type(e)), file=sys.stderr)
|
print(e, file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue