[Spice-devel] [PATCH v5 39/41] dissector: Allows ws_as attribute on switch members

Frediano Ziglio fziglio at redhat.com
Fri Aug 7 08:01:08 PDT 2015


Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 python_modules/dissector.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/python_modules/dissector.py b/python_modules/dissector.py
index 064ed64..9b84561 100644
--- a/python_modules/dissector.py
+++ b/python_modules/dissector.py
@@ -429,6 +429,10 @@ def write_switch(writer, container, switch, dest, scope):
         m = c.member
         with writer.if_block(check, not first, False) as block:
             t = m.member_type
+            if m.has_attr('ws_as'):
+                type_name = m.attributes['ws_as'][0]
+                assert(ptypes.type_exists(type_name))
+                t = ptypes.lookup_type(type_name)
             if switch.has_attr("anon"):
                 dest2 = dest
             else:
-- 
2.1.0



More information about the Spice-devel mailing list