diff --git a/gnes/service/base.py b/gnes/service/base.py index 3d456067..1371ae32 100644 --- a/gnes/service/base.py +++ b/gnes/service/base.py @@ -398,8 +398,8 @@ def _run(self, ctx): # choose output sock if msg.request and msg.request.WhichOneof('body') and \ - type(getattr(msg.request, - msg.request.WhichOneof('body'))) == gnes_pb2.Request.ControlRequest: + isinstance(getattr(msg.request, msg.request.WhichOneof('body')), + gnes_pb2.Request.ControlRequest): o_sock = ctrl_sock else: o_sock = out_sock