catacomb/pwsafe.py: Hack around the change in metaclass syntax.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 21 Oct 2019 17:17:21 +0000 (18:17 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 25 Nov 2019 17:43:08 +0000 (17:43 +0000)
commitb1f8a1a1b30987f472b67bf3a10bc6b1ab4170a1
tree60da91c33e0f36ddd8800f02d5efc903bbc0044e
parent7f5c0c27f85afa10f7a123e4bde03534602b6619
catacomb/pwsafe.py: Hack around the change in metaclass syntax.

Python 2 (all versions) want you to set `__metaclass__' within the class
body.  Python 3 ignores this, treating it like an ordinary class
attribute, and wants you to say `metaclass = ...' in the direct-
superclass list; but the latter is a syntax error to Python 2.

Instead, add a hack which constructs a anonymous class with the right
metaclass to use as a direct superclass.  It's awful, but it works.
catacomb/pwsafe.py