Merge "Encode exception on ceilometer-client for UnicodeDecodeError"
This commit is contained in:
@@ -14,15 +14,20 @@
|
||||
Command-line interface to the OpenStack Telemetry API.
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import httplib2
|
||||
import logging
|
||||
import sys
|
||||
|
||||
import six
|
||||
|
||||
import ceilometerclient
|
||||
from ceilometerclient import client as ceiloclient
|
||||
from ceilometerclient.common import utils
|
||||
from ceilometerclient import exc
|
||||
from ceilometerclient.openstack.common import strutils
|
||||
|
||||
|
||||
class CeilometerShell(object):
|
||||
@@ -291,7 +296,7 @@ def main():
|
||||
CeilometerShell().main(sys.argv[1:])
|
||||
|
||||
except Exception as e:
|
||||
print >> sys.stderr, e
|
||||
print(strutils.safe_encode(six.text_type(e)), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Reference in New Issue
Block a user