From 6ac5481c64ecb624557d44fec96cbb1f6499b3a4 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 16 Aug 2015 19:00:00 +0200 Subject: Py3 modernization: libmodernize.fixes.fix_metaclass Python 3 has a different syntax for meta classes. The old __metaclass__ attribute is no longer supported. six.with_metaclass() constructs a suitable metaclass for us. --- base/common/python/pki/crypto.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'base/common/python') diff --git a/base/common/python/pki/crypto.py b/base/common/python/pki/crypto.py index 9c1c0f881..cf97a668c 100644 --- a/base/common/python/pki/crypto.py +++ b/base/common/python/pki/crypto.py @@ -25,16 +25,16 @@ from __future__ import absolute_import import abc import nss.nss as nss import os +import six import shutil import subprocess import tempfile -class CryptoProvider(object): +class CryptoProvider(six.with_metaclass(abc.ABCMeta, object)): """ Abstract class containing methods to do cryptographic operations. """ - __metaclass__ = abc.ABCMeta def __init__(self): """ Constructor """ -- cgit