Commit 41c1443b authored by Yori Fournier's avatar Yori Fournier
Browse files

FEATURE: merge data added and tested. automatic test neither documentation present.

parent e3f85b1b
Pipeline #656 canceled with stage
......@@ -11,7 +11,7 @@ from . import SERVER_FIGURES
from . import MplFig
from . import DBUG, WARN, SPCE, SEVR, INFO
from . import MplUnpickler
from . import MplUnpickler, MplData
from . import D_DEBUG
......@@ -77,11 +77,20 @@ class MplHandler(socketserver.StreamRequestHandler):
# Try to execute the instructions
try:
for data_name in data_names:
merged_data.append(self.server._rawdata[data_name].data)
if self.server._rawdata.get(data_name, None) is not None:
merged_data.append(self.server._rawdata[data_name].data)
else:
return Status(False, 'Could not create '
+ str(merged_name) + ', ' + str(data_name) + ' does not exist...')
self.server._rawdata[merged_name] = MplData(data=merged_data, name=merged_name)
return Status(True, 'data '
+ str(merged_name) + ' was successfully created from ' + str(data_names))
except Exception:
pass
return Status(False, 'Could not create '
+ str(merged_data) + ' from ' + str(data_names))
return False # should never get here
......
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