<commit_before>#!/usr/bin/python

# XenAPI python plugin boilerplate code

import sys, xmlrpclib, XenAPI
<commit_msg>CA-41292: Provide XenAPIPlugins.Failure exception in order to compatibility with plugins written against previous versions of XenServer.<commit_after>#!/usr/bin/python

# XenAPI python plugin boilerplate code

import sys, xmlrpclib, XenAPI

class Failure(Exception):
    """Provide compatibilty with plugins written against XenServer 5.5 API"""

    def __init__(self, code, params):
        Exception.__init__(self)
        self._params = [ code ] + params
    def __str__(self):
        return str(self._params)
{'fraction_non_alphanumeric': 0.0873015873015873, 'fraction_numerical': 0.011111111111111112, 'mean_word_length': 4.302521008403361, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2219964', 'n_tokens_mistral': 195, 'n_tokens_neox': 177, 'n_words': 58}