diff options
| -rw-r--r-- | pyapd/ctl.py | 8 | 
1 files changed, 3 insertions, 5 deletions
diff --git a/pyapd/ctl.py b/pyapd/ctl.py index 4f5270f..8be523d 100644 --- a/pyapd/ctl.py +++ b/pyapd/ctl.py @@ -1,9 +1,8 @@  import errno  import functools +import json  import socket -import ruamel.yaml -  import tornado.netutil  import tornado.ioloop  import tornado.iostream @@ -19,7 +18,6 @@ class Commands():  class CtlServer():      def __init__(self, config): -        self.yaml = ruamel.yaml.YAML(typ='safe')          self.commands = Commands()          self.config = config          self.ctl_socket = tornado.netutil.bind_unix_socket( @@ -53,7 +51,7 @@ class CtlServer():          print("command result was:", res)      async def get_command(self, message): -        args = self.yaml.load(message) +        args = json.loads(message)          cmd = args.pop('command')          try:              res = getattr(self.commands, cmd)(*args) @@ -61,5 +59,5 @@ class CtlServer():              res = "no such command"          except TypeError:              res = "syntax error" -        # TODO: wrap res in a sensible yaml +        # TODO: wrap res in a sensible json          return res  | 
