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):
if not isinstance(request_dict, dict):
raise Exception(
'Given values to be set in workspace.ini in wrong format')
filename = self.expand(FileSystem.PRIVATE_WORKSPACE_CONF)
config = ConfigParser.ConfigParser()
config.read(self.expand(FileSystem.PRIVATE_WORKSPACE_CONF))
config.read(filename)
for section, options in request_dict.iteritems():
if not isinstance(options, dict):
raise Exception(
......@@ -642,9 +643,12 @@ class FileSystem(object):
config.add_section(section)
for name, value in options.iteritems():
config.set(section, name, value)
with open(self.expand(FileSystem.PRIVATE_WORKSPACE_CONF), 'w') as f:
self._watch_workspaceini()
filedir = os.path.dirname(filename)
if not os.path.isdir(filedir):
os.makedirs(filedir)
with open(filename, 'w') as f:
config.write(f)
self._watch_workspaceini()
return ""
except Exception as 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