Commit 8bbfc310 authored by Yori's avatar Yori
Browse files

Merge branch '102-transmitting-error-message-fails' of...

Merge branch '102-transmitting-error-message-fails' of gitlab.aip.de:yfournier/myplotlib into 102-transmitting-error-message-fails
parents 3481dc35 770c2792
Pipeline #687 failed with stage
in 23 minutes and 59 seconds
......@@ -118,13 +118,13 @@ class MplHandler(socketserver.StreamRequestHandler):
print(SPCE + "SERVER: I tried: "
+ str(fig_class.__name__)
+ '(' + str(datas) + ', ' + str(kwargs) + ')')
print(SPCE + "SERVER: Exception details where:",
e.message, e.args)
print(SPCE + "SERVER: Exception details where:"
+ str(e.args))
return Status(False, "I could not create the requested "
"Figure. I tried: " + str(fig_class.__name__)
+ '(' + str(datas) + ', ' + str(kwargs) + ')'
+ " Exception details where:"
+ str(e.message) + str(e.args))
+ str(e.args))
# add the figure to the global index
self.server._figures[fig.get_fig_id()] = fig
......@@ -166,11 +166,10 @@ class MplHandler(socketserver.StreamRequestHandler):
except Exception as e:
if debug:
print(WARN + "I couldn't format the rawdata.")
print(SPCE + "SERVER: Exception details where:",
e.message,
e.args)
print(SPCE + "SERVER: Exception details where:" +
str(e.args))
return Status(False, "I couldn't format the rawdata."\
" Exception details where:" + str(e.message) + str(e.args))
" Exception details where:" + str(e.args))
# compose the formated data
datas = tuple(ax.data for ax in fig.get_axes())
......@@ -330,10 +329,10 @@ class MplServer(socketserver.TCPServer):
fig = self._figures.get(fig_id,None)
if fig is None:
if debug:
print(WARN + "The figure ID: " + fig_id + " does not exist.")
print(WARN + "The figure ID: " + str(fig_id) + " does not exist.")
return Status(False, "The figure ID: "
+ fig_id + " does not exist.")
+ str(fig_id) + " does not exist.")
elif isinstance(fig, MplFig):
if debug:
print('Figure ', fig_id, ' found in database')
print('Figure ' + str(fig_id) + ' found in database')
return fig
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