Commit d263b794 authored by Gero Müller's avatar Gero Müller
Browse files

create vispa directory on workspace, fixes #2104

parent 2c14ccd8
...@@ -632,8 +632,9 @@ class FileSystem(object): ...@@ -632,8 +632,9 @@ class FileSystem(object):
if not isinstance(request_dict, dict): if not isinstance(request_dict, dict):
raise Exception( raise Exception(
'Given values to be set in workspace.ini in wrong format') 'Given values to be set in workspace.ini in wrong format')
filename = self.expand(FileSystem.PRIVATE_WORKSPACE_CONF)
config = ConfigParser.ConfigParser() config = ConfigParser.ConfigParser()
config.read(self.expand(FileSystem.PRIVATE_WORKSPACE_CONF)) config.read(filename)
for section, options in request_dict.iteritems(): for section, options in request_dict.iteritems():
if not isinstance(options, dict): if not isinstance(options, dict):
raise Exception( raise Exception(
...@@ -642,9 +643,12 @@ class FileSystem(object): ...@@ -642,9 +643,12 @@ class FileSystem(object):
config.add_section(section) config.add_section(section)
for name, value in options.iteritems(): for name, value in options.iteritems():
config.set(section, name, value) config.set(section, name, value)
with open(self.expand(FileSystem.PRIVATE_WORKSPACE_CONF), 'w') as f: filedir = os.path.dirname(filename)
self._watch_workspaceini() if not os.path.isdir(filedir):
os.makedirs(filedir)
with open(filename, 'w') as f:
config.write(f) config.write(f)
self._watch_workspaceini()
return "" return ""
except Exception as e: except Exception as e:
return str(e) return str(e)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment