aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-03-11 08:53:23 +0100
committerAlex Auvolat <alex@adnab.me>2020-03-11 08:53:23 +0100
commit6c118d651eda5f6a86066b1e84e352c71fc6342f (patch)
treef1ea4f1c012ef7f828a3768b473289ddcb79e734 /external
parent15e3dc46cf485f6833e1d6a669a23abe43869ade (diff)
downloadeasybridge-6c118d651eda5f6a86066b1e84e352c71fc6342f.tar.gz
easybridge-6c118d651eda5f6a86066b1e84e352c71fc6342f.zip
Remove temporary test code
Diffstat (limited to 'external')
-rwxr-xr-xexternal/dummy.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/external/dummy.py b/external/dummy.py
deleted file mode 100755
index 2dc47ba..0000000
--- a/external/dummy.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env python3
-
-import sys
-import json
-
-sys.stderr.write("(python) dummy starting")
-sys.stderr.flush()
-
-if __name__ == "__main__":
- username = ""
- while True:
- line = sys.stdin.readline()
- sys.stderr.write("(python) got: {}\n".format(line))
- sys.stderr.flush()
-
- cmd = json.loads(line)
-
- reply = {
- "_type": "rep_ok",
- "_id": cmd["_id"],
- }
-
- if cmd["_type"] == "configure":
- username = cmd["data"]["user"]
- if cmd["_type"] == "get_user":
- reply["user"] = username
-
- repline = json.dumps(reply)
- sys.stderr.write("(python) sending: {}\n".format(repline))
- sys.stderr.flush()
- sys.stdout.write(repline + "\n")
- sys.stdout.flush()
-
- if cmd["_type"] == "close":
- break
-
-sys.stderr.write("(python) dummy stopping")
-sys.stderr.flush()