Skip to content

Commit

Permalink
mockmodel.py: fixing virtviewerfile_tmp path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
danielhb authored and alinefm committed Aug 30, 2016
1 parent 37e038d commit 7bd7a39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mockmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from wok.utils import 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
Expand Down Expand Up @@ -142,7 +143,7 @@ def __init__(self, objstore_loc=None):
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)

Expand Down

0 comments on commit 7bd7a39

Please sign in to comment.