Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d1219d6d5 | ||
|
|
2836995c74 | ||
|
|
1a1bd5c21a | ||
|
|
c927d1c3f5 |
@@ -2,3 +2,5 @@ include tox.ini
|
||||
include LICENSE README
|
||||
include version.py
|
||||
include tools/*
|
||||
include quantum/client/tests/*
|
||||
include quantum/client/tests/unit/*
|
||||
|
||||
@@ -115,7 +115,8 @@ def exception_handler_v11(status_code, error_content):
|
||||
message=error_message)],)
|
||||
raise ex
|
||||
# If we end up here the exception was not a quantum error
|
||||
raise exceptions.QuantumClientException(status_code + "-" + error_content)
|
||||
msg = "%s-%s" % (status_code, error_content)
|
||||
raise exceptions.QuantumClientException(message=msg)
|
||||
|
||||
|
||||
EXCEPTION_HANDLERS = {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
FORMAT = "json"
|
||||
LOG = logging.getLogger('quantum.client.cli_lib')
|
||||
@@ -192,7 +193,6 @@ class CmdOutputTemplate(OutputTemplate):
|
||||
|
||||
|
||||
def _handle_exception(ex):
|
||||
LOG.exception(sys.exc_info())
|
||||
status_code = None
|
||||
message = None
|
||||
# Retrieve dict at 1st element of tuple at last argument
|
||||
@@ -202,12 +202,10 @@ def _handle_exception(ex):
|
||||
msg_1 = "Command failed with error code: %s" \
|
||||
% (status_code or '<missing>')
|
||||
msg_2 = "Error message:%s" % (message or '<missing>')
|
||||
LOG.exception(msg_1 + "-" + msg_2)
|
||||
print msg_1
|
||||
print msg_2
|
||||
else:
|
||||
print "An unexpected exception occured:%s (%s)" % (sys.exc_info()[1],
|
||||
sys.exc_info()[0])
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
def prepare_output(cmd, tenant_id, response, version):
|
||||
|
||||
@@ -24,7 +24,7 @@ except ImportError:
|
||||
QUANTUM_VERSION = ['2012', '1', None]
|
||||
YEAR, COUNT, REVSISION = QUANTUM_VERSION
|
||||
|
||||
FINAL = False # This becomes true at Release Candidate time
|
||||
FINAL = True # This becomes true at Release Candidate time
|
||||
|
||||
|
||||
def canonical_version_string():
|
||||
|
||||
Reference in New Issue
Block a user