diff options
author | Clayton Smith <argilo@gmail.com> | 2020-06-07 21:52:06 -0400 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2020-06-11 12:48:39 -0400 |
commit | addaea2e91cffae631f57885c7a7c161d954a800 (patch) | |
tree | d0e6fb536cb4d83f0764c38df18b0a1719d7b306 | |
parent | 963816bce28c3e73fb8f4d0fcf91c6a272838a74 (diff) |
blocks: Fix XMLRPC Client block templates
The XMLRPC Client block is currently broken because it tries to import
the Python 2 XMLRPC module, and because the "addr" and "callback"
parameters are inserted as quoted strings. To fix these problems, I've
switched to the Python 3 version of the XMLRPC module, and changed the
data types of the problematic parameters to "raw".
-rw-r--r-- | gr-blocks/grc/xmlrpc_client.block.yml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gr-blocks/grc/xmlrpc_client.block.yml b/gr-blocks/grc/xmlrpc_client.block.yml index 308629a680..ba2d45eef2 100644 --- a/gr-blocks/grc/xmlrpc_client.block.yml +++ b/gr-blocks/grc/xmlrpc_client.block.yml @@ -5,7 +5,7 @@ flags: [ python ] parameters: - id: addr label: Address - dtype: string + dtype: raw default: localhost - id: port label: Port @@ -13,15 +13,15 @@ parameters: default: '8080' - id: callback label: Callback - dtype: string + dtype: raw default: set_ - id: variable label: Variable dtype: raw templates: - imports: import xmlrpclib - make: xmlrpclib.Server('http://${addr}:${port}') + imports: from xmlrpc.client import ServerProxy + make: ServerProxy('http://${addr}:${port}') callbacks: - ${callback}(${variable}) |