diff --git a/OscCommentMacroListener.py b/OscCommentMacroListener.py index 7062fc0..9fd66c9 100644 --- a/OscCommentMacroListener.py +++ b/OscCommentMacroListener.py @@ -112,5 +112,4 @@ class OscCommentMacroListener(CommentMacroListener): ctx.parentCtx.device = ctx def exitNodeType(self, ctx: CommentMacroParser.NodeTypeContext): - if isinstance(ctx.parentCtx, CommentMacroParser.DeviceContext): - ctx.parentCtx.type = ctx + ctx.parentCtx.type = ctx.getText() diff --git a/OscMacroDefinitions.py b/OscMacroDefinitions.py index bf9dfc6..80469d7 100644 --- a/OscMacroDefinitions.py +++ b/OscMacroDefinitions.py @@ -47,7 +47,7 @@ class HogDevice(): if device is None: osc = list(self.servers.values())[0] else: - if (device.type.getText() != 'h'): + if (device.type != 'h'): logger.error("ERROR: Only Hog type devices are supported.") return else: