aboutsummaryrefslogtreecommitdiff
path: root/mmi2grpc/_proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'mmi2grpc/_proxy.py')
-rw-r--r--mmi2grpc/_proxy.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/mmi2grpc/_proxy.py b/mmi2grpc/_proxy.py
new file mode 100644
index 0000000..f5065a3
--- /dev/null
+++ b/mmi2grpc/_proxy.py
@@ -0,0 +1,12 @@
+from mmi2grpc._description import format_function
+
+
+class ProfileProxy:
+
+ def interact(self, id: str, test: str, description: str, pts_addr: bytes):
+ try:
+ return getattr(self, id)(
+ test=test, description=description, pts_addr=pts_addr)
+ except AttributeError:
+ code = format_function(id, description)
+ assert False, f'Unhandled mmi {id}\n{code}'