From 955a4264b440aea57232d24393893e20e8002530 Mon Sep 17 00:00:00 2001 From: SE2Dev Date: Sun, 7 Jan 2018 19:43:23 -0500 Subject: [PATCH] Python 3.x Compatibility Fix for Siege Anims --- sanim.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sanim.py b/sanim.py index a511ec5..0fec740 100644 --- a/sanim.py +++ b/sanim.py @@ -10,6 +10,14 @@ --------------------------- ''' +# buffer() is required for file.writestr in Python 2.x but +# is no longer required (and doesn't exist) in Python 3.x +try: + buffer +except NameError: + def buffer(data): + return data + class Frame(object): __slots__ = ('index', 'position', 'rotation')