From 909f2a12e401bd80084088dd8cb9bea40d81c73e Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Tue, 24 Apr 2012 04:00:47 +0200 Subject: [PATCH] plouf --- client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client.py b/client.py index 8cbbb33..9bff069 100755 --- a/client.py +++ b/client.py @@ -52,6 +52,8 @@ def login(socket,user,mdp="",typ="bdd"): a.write('login ["20-100","plop","bdd"]') elif user in ["vincent","moi"]: a.write('login ["vincent","plop","special"]') + elif user in ["toto"]: + a.write('login ["toto","plop","bdd"]') else: a.write('login ["%s","%s","%s"]'%(user,mdp,typ)) return lit(a) @@ -62,7 +64,7 @@ def search(socket,term): def lit(socket): try: - t=a.read() + t=a.read(4096) obj=json.loads(t) if obj["retcode"]==0: return obj['msg'] -- 2.39.2