nat: use correct data types for memory sizes
[vpp.git] / test / remote_test.py
index 9c825cc..8b3def2 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import inspect
 import os
@@ -9,7 +9,11 @@ from pickle import dumps
 import six
 from six import moves
 import sys
-from aenum import IntEnum, IntFlag
+
+if sys.version_info < (3,):
+    from aenum import IntEnum, IntFlag
+else:
+    from enum import IntEnum, IntFlag
 
 
 class SerializableClassCopy(object):
@@ -248,12 +252,14 @@ class RemoteClass(Process):
             if name[0] == '_':
                 if name in ['__weakref__']:
                     continue
+                if name in ['__dict__']:
+                    continue
                 if not (name.startswith('__') and name.endswith('__')):
                     continue
             if callable(member) and not isinstance(member, property):
                 continue
             if not self._serializable(member):
-                continue
+                member = self._make_serializable(member)
             setattr(copy, name, member)
         return copy