Commit f47460ea authored by Yori 'AGy' Fournier's avatar Yori 'AGy' Fournier
Browse files

Now the handling of status is porper

parent c05b53c8
......@@ -12,6 +12,9 @@ from . import SERVER_FIGURES
G_RAWDATA = {}
G_FIGURES = {}
def emptyfct():
return(False)
# CLASS SERVER ---------------------------------------------------------
class MplServer():
......@@ -207,7 +210,7 @@ class MplServer():
return(False)
# Send the final message
answer = ('readData', str(dataName), 'data read with success.')
answer = ('readData', 'True', 'data read with success.')
self.sendAnswer(conn, answer)
return(True)
......@@ -266,7 +269,7 @@ class MplServer():
self.sendAnswer(conn, answer)
self.closeConnection(conn)
fct = self.knownFunctions.get(fct, None) # SHOULD DEFINE EMPTY FUNCTION
fct = self.knownFunctions.get(fct, emptyfct) # SHOULD DEFINE EMPTY FUNCTION
args = eval(args)
kwargs = eval(kwargs)
......@@ -407,7 +410,7 @@ class MplServer():
# CLOSE CONNECTION -------------------------------------------------
def closeConnection(self, conn):
'''Close given connection.'''
# conn.close()
conn.close()
self.connected = False
return(True)
......
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