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>
Sat, 11 Apr 2020 11:44:21 +0000 (12:44 +0100)
commit0e0e6b09d69d8d2a488263217f2afa9bd24bb296
treea921874bf794c7f81ad86653822c20e137e5ecd0
parent94db70d4a9aa49a2f8fec1e3eca5b93dc33e61e2
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