# Path: bugzilla/_util.py
# def listify(val):
#     """Ensure that value is either None or a list, converting single values
#     into 1-element lists"""
#     if val is None:
#         return val
#     if isinstance(val, list):
#         return val
#     return [val]


from logging import getLogger
from xmlrpc.client import (Binary, Fault, ProtocolError,
                           ServerProxy, Transport)
from requests import RequestException
from ._backendbase import _BackendBase
from .exceptions import BugzillaError
from ._util import listify
import sys

    def get_xmlrpc_proxy(self):
        return self._xmlrpc_proxy
    def is_xmlrpc(self):
        return True

    def bugzilla_version(self):
        return self._xmlrpc_proxy.Bugzilla.version()

    def bug_attachment_get(self, attachment_ids, paramdict):
        data = paramdict.copy()
        data["attachment_ids"] = listify(attachment_ids)
        return self._xmlrpc_proxy.Bug.attachments(data)
    def bug_attachment_get_all(self, bug_ids, paramdict):
        data = paramdict.copy()
        data["ids"] = listify(bug_ids)
        return self._xmlrpc_proxy.Bug.attachments(data)
    def bug_attachment_create(self, bug_ids, data, paramdict):
        pdata = paramdict.copy()
        pdata["ids"] = listify(bug_ids)
        if data is not None and "data" not in paramdict:
            pdata["data"] = Binary(data)
        return self._xmlrpc_proxy.Bug.add_attachment(pdata)
    def bug_attachment_update(self, attachment_ids, paramdict):
        data = paramdict.copy()
        data["ids"] = listify(attachment_ids)
        return self._xmlrpc_proxy.Bug.update_attachment(data)

    def bug_comments(self, bug_ids, paramdict):
        data = paramdict.copy()

# Path: bugzilla/_util.py
# def listify(val):
#     """Ensure that value is either None or a list, converting single values
#     into 1-element lists"""
#     if val is None:
#         return val
#     if isinstance(val, list):
#         return val
#     return [val]


# Path: bugzilla/_backendxmlrpc.py
from logging import getLogger
from xmlrpc.client import (Binary, Fault, ProtocolError,
                           ServerProxy, Transport)
from requests import RequestException
from ._backendbase import _BackendBase
from .exceptions import BugzillaError
from ._util import listify
import sys


    def get_xmlrpc_proxy(self):
        return self._xmlrpc_proxy
    def is_xmlrpc(self):
        return True

    def bugzilla_version(self):
        return self._xmlrpc_proxy.Bugzilla.version()

    def bug_attachment_get(self, attachment_ids, paramdict):
        data = paramdict.copy()
        data["attachment_ids"] = listify(attachment_ids)
        return self._xmlrpc_proxy.Bug.attachments(data)
    def bug_attachment_get_all(self, bug_ids, paramdict):
        data = paramdict.copy()
        data["ids"] = listify(bug_ids)
        return self._xmlrpc_proxy.Bug.attachments(data)
    def bug_attachment_create(self, bug_ids, data, paramdict):
        pdata = paramdict.copy()
        pdata["ids"] = listify(bug_ids)
        if data is not None and "data" not in paramdict:
            pdata["data"] = Binary(data)
        return self._xmlrpc_proxy.Bug.add_attachment(pdata)
    def bug_attachment_update(self, attachment_ids, paramdict):
        data = paramdict.copy()
        data["ids"] = listify(attachment_ids)
        return self._xmlrpc_proxy.Bug.update_attachment(data)

    def bug_comments(self, bug_ids, paramdict):
        data = paramdict.copy()

        data["ids"] = listify(bug_ids)