From 0372e8afd7973748f5c9ef7cde99aead4ed71965 Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Tue, 15 Nov 2016 13:52:00 +0200 Subject: [PATCH] fix StructMessage metaclass compability --- steam/core/msg_structs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/steam/core/msg_structs.py b/steam/core/msg_structs.py index af805c0..a4a9213 100644 --- a/steam/core/msg_structs.py +++ b/steam/core/msg_structs.py @@ -1,5 +1,6 @@ """Classes to (de)serialize various struct messages""" import struct +import six from steam.enums import EResult, EUniverse from steam.enums.emsg import EMsg @@ -8,7 +9,7 @@ _emsg_map = {} def get_struct(emsg): return _emsg_map.get(emsg, None) -class MapEMsgMeta(type): +class StructMessageMeta(type): """Automatically maps subclasses of :class:`StructMessage` to ``EMsg``""" def __new__(metacls, name, bases, classdict): @@ -22,9 +23,8 @@ class MapEMsgMeta(type): return cls +@six.add_metaclass(StructMessageMeta) class StructMessage: - __metaclass__ = MapEMsgMeta - def __init__(self, data=None): if data: self.load(data)