Minor cosmetic touch-ups.

Removed some imports that are no longer needed.
This commit is contained in:
Andrew Resch 2008-02-22 22:36:31 +00:00
parent 80f11bff0f
commit 616dd6288a
1 changed files with 7 additions and 11 deletions

View File

@ -33,9 +33,7 @@
# statement from all source files in the program, then also delete it here. # statement from all source files in the program, then also delete it here.
import os.path import os.path
import pickle
import socket import socket
import time
import gobject import gobject
@ -155,24 +153,22 @@ class BaseClient(object):
wraps all calls to core/coreproxy wraps all calls to core/coreproxy
base for AClient and SClient base for AClient and SClient
""" """
no_callback_list = [ "add_torrent_url", "pause_all_torrents", no_callback_list = ["add_torrent_url", "pause_all_torrents",
"resume_all_torrent", "set_config", "enable_plugin", "resume_all_torrent", "set_config", "enable_plugin",
"disable_plugin", "set_torrent_trackers", "disable_plugin", "set_torrent_trackers",
"set_torrent_max_connections", "set_torrent_max_upload_slots", "set_torrent_max_connections", "set_torrent_max_upload_slots",
"set_torrent_max_upload_speed", "set_torrent_max_download_speed", "set_torrent_max_upload_speed", "set_torrent_max_download_speed",
"set_torrent_private_flag", "set_torrent_file_priorities", "set_torrent_private_flag", "set_torrent_file_priorities",
"block_ip_range", "block_ip_range", "remove_torrent", "pause_torrent", "move_torrent",
"remove_torrent", "pause_torrent", "move_torrent" , "resume_torrent", "force_reannounce", "force_recheck",
"resume_torrent","force_reannounce", "force_recheck", "deregister_client", "register_client", "add_torrent_file"]
"deregister_client","register_client",
"add_torrent_file"]
def __init__(self): def __init__(self):
self.core = _core self.core = _core
#xml-rpc introspection #xml-rpc introspection
def list_methods(self): def list_methods(self):
registered = self.core.rpc_core.system.listMethods( ) registered = self.core.rpc_core.system.listMethods()
return sorted(registered) return sorted(registered)
def methodSignature(self, method_name): def methodSignature(self, method_name):
@ -244,7 +240,7 @@ class BaseClient(object):
"""Get the core URI""" """Get the core URI"""
return self.core.get_core_uri() return self.core.get_core_uri()
def set_core_uri(self, uri = 'http://localhost:58846'): def set_core_uri(self, uri='http://localhost:58846'):
"""Sets the core uri""" """Sets the core uri"""
return self.core.set_core_uri(uri) return self.core.set_core_uri(uri)
@ -285,7 +281,7 @@ class AClient(BaseClient):
def get_method(self, method_name): def get_method(self, method_name):
if not self.has_callback(method_name): if not self.has_callback(method_name):
def async_proxy_nocb(*args, **kwargs): def async_proxy_nocb(*args, **kwargs):
return self.core.call(method_name,None, *args, **kwargs) return self.core.call(method_name, None, *args, **kwargs)
return async_proxy_nocb return async_proxy_nocb
else: else:
def async_proxy(*args, **kwargs): def async_proxy(*args, **kwargs):