[PATCH] [Kimchi] mockmodel.py: fixing virtviewerfile_tmp path

From: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> Instead of using relative path, use the path provided by kimchi config. Otherwise, when running WoK tests, the 'wok/data/virtviewerfiles/' dir will be wrongly created and used by the mockmodel. Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> --- mockmodel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mockmodel.py b/mockmodel.py index cd06ee3..61e5ee1 100644 --- a/mockmodel.py +++ b/mockmodel.py @@ -33,6 +33,7 @@ from wok.objectstore import ObjectStore from wok.utils import add_task, convert_data_size from wok.xmlutils.utils import xml_item_update +from wok.plugins.kimchi import config as kimchi_config from wok.plugins.kimchi import imageinfo from wok.plugins.kimchi import osinfo from wok.plugins.kimchi.model import cpuinfo @@ -141,7 +142,7 @@ class MockModel(Model): cherrypy.engine.subscribe('exit', self.virtviewertmpfile_cleanup) def _create_virt_viewer_tmp_file(self): - path = '../data/virtviewerfiles/' + path = kimchi_config.get_virtviewerfiles_path() if not os.path.isdir(path): os.makedirs(path) -- 2.5.5

Applied. Thanks. Regards, Aline Manera
participants (2)
-
Aline Manera
-
dhbarboza82@gmail.com