@classmethod
    def init_table(cls, key, method):
        cls.method = None if method == 'table' else method.lower()
        cls.key = key
        if cls.method:
            try:
                __import__('M2Crypto')
            except __HOLE__:
                logger.error(
                    'M2Crypto is required to use encryption other than default method')
                sys.exit(1)
        if method:
            cls.encrypt_table, cls.decrypt_table = get_table(key)
        else:
            try:
                # make an Encryptor to test if the settings if OK
                Crypto()
            except Exception as e:
                logger.error(e)
                sys.exit(1)
dataset/ETHPy150Open mrknow/filmkodi/plugin.video.mrknow/lib/test/test.py/Crypto.init_table