diff options
-rw-r--r-- | nova/api/openstack/compute/contrib/coverage_ext.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/api/openstack/compute/contrib/coverage_ext.py b/nova/api/openstack/compute/contrib/coverage_ext.py index 7ad549d4c..e451111a4 100644 --- a/nova/api/openstack/compute/contrib/coverage_ext.py +++ b/nova/api/openstack/compute/contrib/coverage_ext.py @@ -203,6 +203,9 @@ class CoverageController(object): if xml: self.coverInst.xml_report(outfile=path) elif html: + if os.path.isdir(path): + msg = _("Directory conflict: %s already exists") + raise exc.HTTPBadRequest(explanation=msg) self.coverInst.html_report(directory=path) else: output = open(path, 'w') |