# Path: lib/xmlrpc.py
# class RTorrentXMLRPC(object):
# 
#     def __init__(self, target):
#         self.info = target
# 
#         if self.info['type'] == CONNECTION_HTTP:
#             self.c = xmlrpc.client.ServerProxy('http://%s:%i%s' % \
#                 (self.info['host'], self.info['port'], \
#                 self.info['url']))
#         else:
#             self.c = xmlrpc2scgi.RTorrentXMLRPCClient(self.info['fd'])
# 
# 
#     def __getattr__(self, attr, **args):
#         return getattr(self.c, attr)
# 
# Path: lib/multibase.py
# class InvalidTorrentCommandException(Exception):
#     """
#     Thrown on an invalid command.
#     """


from lib.xmlrpc import RTorrentXMLRPC
from lib.multibase import InvalidTorrentCommandException
        self.extra_args = extra_args

        # Stack to put commands on
        self.commandstack = []

        # Same as commandstack, but stores the original names.
        # We need to for .all()
        self.commandistack = []

        # Contains possible arguments.
        self.commands = {}

    def __hash__(self):
        h = 42 ^ hash(self.target)

        for x in self.commandstack:
            h ^= hash(x)
            for y in self.commands[x]:
                h ^= hash(y)

        for x in self.extra_args:
            h ^= hash(x)

        return h

    def __call__(self, *args):
        """
        Return self so we can chain calls:
        """
        if len(args):

# Path: lib/xmlrpc.py
# class RTorrentXMLRPC(object):
# 
#     def __init__(self, target):
#         self.info = target
# 
#         if self.info['type'] == CONNECTION_HTTP:
#             self.c = xmlrpc.client.ServerProxy('http://%s:%i%s' % \
#                 (self.info['host'], self.info['port'], \
#                 self.info['url']))
#         else:
#             self.c = xmlrpc2scgi.RTorrentXMLRPCClient(self.info['fd'])
# 
# 
#     def __getattr__(self, attr, **args):
#         return getattr(self.c, attr)
# 
# Path: lib/multibase.py
# class InvalidTorrentCommandException(Exception):
#     """
#     Thrown on an invalid command.
#     """


# Path: lib/baserequester.py
from lib.xmlrpc import RTorrentXMLRPC
from lib.multibase import InvalidTorrentCommandException

        self.extra_args = extra_args

        # Stack to put commands on
        self.commandstack = []

        # Same as commandstack, but stores the original names.
        # We need to for .all()
        self.commandistack = []

        # Contains possible arguments.
        self.commands = {}

    def __hash__(self):
        h = 42 ^ hash(self.target)

        for x in self.commandstack:
            h ^= hash(x)
            for y in self.commands[x]:
                h ^= hash(y)

        for x in self.extra_args:
            h ^= hash(x)

        return h

    def __call__(self, *args):
        """
        Return self so we can chain calls:
        """
        if len(args):

            raise InvalidTorrentCommandException('No parameters are supported' \