Skip to content
Snippets Groups Projects
Commit 4427d873 authored by Ismail Moumni's avatar Ismail Moumni
Browse files

editing

parent 3c921e5f
No related branches found
No related tags found
1 merge request!5Adding json functions
Pipeline #707 failed with stage
in 15 seconds
......@@ -32,14 +32,13 @@ class RdosServer:
data = conn.recv(4096)
query = (json.loads(data.decode('utf-8')))
print(query)
if query_valid(query):
match = verif_param(query)
if match == query:
print("ok")
conn.send(bytes(json.dumps(match), "utf-8"))
else:
print('Erreur query : ')
conn.send(bytes(json.dumps(match), "utf-8"))
match = verif_param(query)
if match == query:
print("ok")
conn.send(bytes(json.dumps(match), "utf-8"))
else:
print('Erreur query : ')
conn.send(bytes(json.dumps(match), "utf-8"))
# Function query_valwid matches the query send from client side
......@@ -60,8 +59,8 @@ def query_valid(data: dict):
# Function output returns a new dictionary containing arguments
# # for db query and list of tools
def send_param_client(__RDOS_Dict__: dict, __RDOS_Tools__: list):
# req = db.getParameters()
pass
req = db.getParameters()
return req
# Function json_loads changes a json file into a Dict
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment