Fix the message of coverage directory error
If a coverage-report directory conflicts, the error message is incomplete like the following: $ nova coverage-start --combine Coverage collection started $ $ nova coverage-report --html test01 Report path: /tmp/nova-coverage_Krl__k/test01 $ $ nova coverage-start --combine Coverage collection started $ nova coverage-report --html test01 ERROR: Directory conflict: %s already exists (HTTP 400) $ This patch fixes the message. Fixes bug #1217315 Change-Id: Ie21b0e87262a3caef36d93711ee96529ec699cec
This commit is contained in:
@@ -215,7 +215,7 @@ class CoverageController(object):
|
||||
coverInst.xml_report(outfile=path)
|
||||
elif html:
|
||||
if os.path.isdir(path):
|
||||
msg = _("Directory conflict: %s already exists")
|
||||
msg = _("Directory conflict: %s already exists") % path
|
||||
raise exc.HTTPBadRequest(explanation=msg)
|
||||
coverInst.html_report(directory=path)
|
||||
else:
|
||||
|
||||
@@ -248,7 +248,7 @@ class CoverageController(wsgi.Controller):
|
||||
coverInst.xml_report(outfile=path)
|
||||
elif html:
|
||||
if os.path.isdir(path):
|
||||
msg = _("Directory conflict: %s already exists")
|
||||
msg = _("Directory conflict: %s already exists") % path
|
||||
raise exc.HTTPBadRequest(explanation=msg)
|
||||
coverInst.html_report(directory=path)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user