Sort/prettify imports with isort
This commit is contained in:
parent
1ca08ccf95
commit
b5dcfc6f9e
|
@ -1,7 +1,9 @@
|
||||||
from new import classobj
|
from new import classobj
|
||||||
|
|
||||||
from deluge.core.core import Core
|
from deluge.core.core import Core
|
||||||
from deluge.core.daemon import Daemon
|
from deluge.core.daemon import Daemon
|
||||||
|
|
||||||
|
|
||||||
class RpcApi:
|
class RpcApi:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -17,4 +19,4 @@ def scan_for_methods(obj):
|
||||||
setattr(RpcApi, obj.__name__.lower(), cobj)
|
setattr(RpcApi, obj.__name__.lower(), cobj)
|
||||||
|
|
||||||
scan_for_methods(Core)
|
scan_for_methods(Core)
|
||||||
scan_for_methods(Daemon)
|
scan_for_methods(Daemon)
|
||||||
|
|
|
@ -75,7 +75,7 @@ def bdecode(x):
|
||||||
|
|
||||||
return r
|
return r
|
||||||
|
|
||||||
from types import StringType, IntType, LongType, DictType, ListType, TupleType
|
from types import DictType, IntType, ListType, LongType, StringType, TupleType
|
||||||
|
|
||||||
|
|
||||||
class Bencached(object):
|
class Bencached(object):
|
||||||
|
|
|
@ -9,20 +9,23 @@
|
||||||
|
|
||||||
"""Common functions for various parts of Deluge to use."""
|
"""Common functions for various parts of Deluge to use."""
|
||||||
|
|
||||||
import os
|
import base64
|
||||||
import sys
|
|
||||||
import time
|
|
||||||
import subprocess
|
|
||||||
import platform
|
|
||||||
import chardet
|
|
||||||
import logging
|
|
||||||
import pkg_resources
|
|
||||||
import gettext
|
import gettext
|
||||||
import locale
|
import locale
|
||||||
import base64
|
import logging
|
||||||
|
import os
|
||||||
|
import platform
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
import urllib
|
import urllib
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
|
import chardet
|
||||||
|
import pkg_resources
|
||||||
|
|
||||||
|
from deluge.error import InvalidPathError
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import dbus
|
import dbus
|
||||||
bus = dbus.SessionBus()
|
bus = dbus.SessionBus()
|
||||||
|
@ -30,7 +33,6 @@ try:
|
||||||
except:
|
except:
|
||||||
dbus_fileman = None
|
dbus_fileman = None
|
||||||
|
|
||||||
from deluge.error import InvalidPathError
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,8 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from twisted.internet.defer import maybeDeferred, succeed, DeferredList, fail
|
|
||||||
|
from twisted.internet.defer import DeferredList, fail, maybeDeferred, succeed
|
||||||
from twisted.internet.task import LoopingCall
|
from twisted.internet.task import LoopingCall
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
|
@ -68,10 +68,10 @@ version as this will be done internally.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import cPickle as pickle
|
import cPickle as pickle
|
||||||
import logging
|
|
||||||
import shutil
|
|
||||||
import os
|
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
from deluge.common import get_default_config_dir, utf8_encoded
|
from deluge.common import get_default_config_dir, utf8_encoded
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
import deluge.log
|
import deluge.log
|
||||||
|
|
|
@ -17,6 +17,7 @@ This should typically only be used by the Core. Plugins should utilize the
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from twisted.internet import reactor
|
from twisted.internet import reactor
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
|
|
@ -8,17 +8,15 @@
|
||||||
# See LICENSE for more details.
|
# See LICENSE for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import logging
|
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
import deluge.configmanager as configmanager
|
import deluge.configmanager as configmanager
|
||||||
from deluge.common import (AUTH_LEVEL_ADMIN, AUTH_LEVEL_NONE, AUTH_LEVEL_NORMAL,
|
from deluge.common import (AUTH_LEVEL_ADMIN, AUTH_LEVEL_DEFAULT, AUTH_LEVEL_NONE, AUTH_LEVEL_NORMAL,
|
||||||
AUTH_LEVEL_READONLY, AUTH_LEVEL_DEFAULT,
|
AUTH_LEVEL_READONLY, create_localclient_account)
|
||||||
create_localclient_account)
|
from deluge.error import AuthenticationRequired, AuthManagerError, BadLoginError
|
||||||
|
|
||||||
from deluge.error import AuthManagerError, AuthenticationRequired, BadLoginError
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -34,38 +34,36 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from deluge._libtorrent import lt
|
|
||||||
|
|
||||||
import os
|
|
||||||
import glob
|
|
||||||
import shutil
|
|
||||||
import base64
|
import base64
|
||||||
|
import glob
|
||||||
import logging
|
import logging
|
||||||
import threading
|
import os
|
||||||
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import threading
|
||||||
from urlparse import urljoin
|
from urlparse import urljoin
|
||||||
|
|
||||||
import twisted.web.client
|
import twisted.web.client
|
||||||
import twisted.web.error
|
import twisted.web.error
|
||||||
|
|
||||||
from deluge.httpdownloader import download_file
|
|
||||||
from deluge import path_chooser_common
|
|
||||||
|
|
||||||
from deluge.configmanager import ConfigManager, get_config_dir
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
from deluge.event import NewVersionAvailableEvent, SessionPausedEvent, SessionResumedEvent, TorrentQueueChangedEvent
|
from deluge import path_chooser_common
|
||||||
from deluge.error import DelugeError, InvalidTorrentError, InvalidPathError
|
from deluge._libtorrent import lt
|
||||||
from deluge.core.authmanager import AUTH_LEVEL_ADMIN, AUTH_LEVEL_NONE
|
from deluge.configmanager import ConfigManager, get_config_dir
|
||||||
from deluge.core.authmanager import AUTH_LEVELS_MAPPING, AUTH_LEVELS_MAPPING_REVERSE
|
|
||||||
from deluge.core.torrentmanager import TorrentManager
|
|
||||||
from deluge.core.pluginmanager import PluginManager
|
|
||||||
from deluge.core.alertmanager import AlertManager
|
from deluge.core.alertmanager import AlertManager
|
||||||
from deluge.core.filtermanager import FilterManager
|
from deluge.core.authmanager import (AUTH_LEVEL_ADMIN, AUTH_LEVEL_NONE, AUTH_LEVELS_MAPPING,
|
||||||
from deluge.core.preferencesmanager import PreferencesManager
|
AUTH_LEVELS_MAPPING_REVERSE, AuthManager)
|
||||||
from deluge.core.authmanager import AuthManager
|
|
||||||
from deluge.core.eventmanager import EventManager
|
from deluge.core.eventmanager import EventManager
|
||||||
|
from deluge.core.filtermanager import FilterManager
|
||||||
|
from deluge.core.pluginmanager import PluginManager
|
||||||
|
from deluge.core.preferencesmanager import PreferencesManager
|
||||||
from deluge.core.rpcserver import export
|
from deluge.core.rpcserver import export
|
||||||
|
from deluge.core.torrentmanager import TorrentManager
|
||||||
|
from deluge.error import DelugeError, InvalidPathError, InvalidTorrentError
|
||||||
|
from deluge.event import (NewVersionAvailableEvent, SessionPausedEvent, SessionResumedEvent,
|
||||||
|
TorrentQueueChangedEvent)
|
||||||
|
from deluge.httpdownloader import download_file
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -9,16 +9,17 @@
|
||||||
|
|
||||||
"""The Deluge daemon"""
|
"""The Deluge daemon"""
|
||||||
|
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
from twisted.internet import reactor
|
from twisted.internet import reactor
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
from deluge.common import get_version, is_ip, windows_check
|
||||||
from deluge.configmanager import get_config_dir
|
from deluge.configmanager import get_config_dir
|
||||||
from deluge.common import get_version, windows_check, is_ip
|
|
||||||
from deluge.core.rpcserver import RPCServer, export
|
|
||||||
from deluge.error import DaemonRunningError
|
|
||||||
from deluge.core.core import Core
|
from deluge.core.core import Core
|
||||||
|
from deluge.core.rpcserver import export, RPCServer
|
||||||
|
from deluge.error import DaemonRunningError
|
||||||
|
|
||||||
if windows_check():
|
if windows_check():
|
||||||
from win32api import SetConsoleCtrlHandler
|
from win32api import SetConsoleCtrlHandler
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
|
@ -33,8 +33,9 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
|
||||||
import copy
|
import copy
|
||||||
|
import logging
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
from deluge.common import TORRENT_STATE
|
from deluge.common import TORRENT_STATE
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,9 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from deluge.event import PluginEnabledEvent, PluginDisabledEvent
|
|
||||||
import deluge.pluginmanagerbase
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
import deluge.pluginmanagerbase
|
||||||
|
from deluge.event import PluginDisabledEvent, PluginEnabledEvent
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -34,17 +34,17 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from twisted.internet.task import LoopingCall
|
from twisted.internet.task import LoopingCall
|
||||||
|
|
||||||
from deluge._libtorrent import lt
|
|
||||||
|
|
||||||
from deluge.event import ConfigValueChangedEvent
|
|
||||||
import deluge.configmanager
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
import deluge.configmanager
|
||||||
|
from deluge._libtorrent import lt
|
||||||
|
from deluge.event import ConfigValueChangedEvent
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -35,25 +35,22 @@
|
||||||
|
|
||||||
"""RPCServer Module"""
|
"""RPCServer Module"""
|
||||||
|
|
||||||
import sys
|
import logging
|
||||||
import os
|
import os
|
||||||
import stat
|
import stat
|
||||||
import logging
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
from types import FunctionType
|
||||||
from twisted.internet.protocol import Factory
|
|
||||||
from twisted.internet import reactor, defer
|
|
||||||
|
|
||||||
from OpenSSL import crypto, SSL
|
from OpenSSL import crypto, SSL
|
||||||
from types import FunctionType
|
from twisted.internet import defer, reactor
|
||||||
|
from twisted.internet.protocol import Factory
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
import deluge.configmanager
|
import deluge.configmanager
|
||||||
from deluge.core.authmanager import (AUTH_LEVEL_NONE, AUTH_LEVEL_DEFAULT,
|
from deluge.core.authmanager import AUTH_LEVEL_ADMIN, AUTH_LEVEL_DEFAULT, AUTH_LEVEL_NONE
|
||||||
AUTH_LEVEL_ADMIN)
|
from deluge.error import (_ClientSideRecreateError, DelugeError, IncompatibleClient, NotAuthorizedError,
|
||||||
from deluge.error import (DelugeError, NotAuthorizedError, WrappedException,
|
WrappedException)
|
||||||
_ClientSideRecreateError, IncompatibleClient)
|
|
||||||
|
|
||||||
from deluge.transfer import DelugeTransferProtocol
|
from deluge.transfer import DelugeTransferProtocol
|
||||||
|
|
||||||
RPC_RESPONSE = 1
|
RPC_RESPONSE = 1
|
||||||
|
|
|
@ -16,20 +16,20 @@ Attributes:
|
||||||
|
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
|
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import socket
|
import socket
|
||||||
from urlparse import urlparse
|
|
||||||
from itertools import izip
|
from itertools import izip
|
||||||
|
from urlparse import urlparse
|
||||||
|
|
||||||
from twisted.internet.defer import Deferred, DeferredList
|
from twisted.internet.defer import Deferred, DeferredList
|
||||||
from deluge._libtorrent import lt
|
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
from deluge.configmanager import ConfigManager, get_config_dir
|
from deluge._libtorrent import lt
|
||||||
from deluge.event import TorrentStateChangedEvent, TorrentFolderRenamedEvent
|
|
||||||
from deluge.common import decode_string, utf8_encoded
|
from deluge.common import decode_string, utf8_encoded
|
||||||
|
from deluge.configmanager import ConfigManager, get_config_dir
|
||||||
from deluge.core.authmanager import AUTH_LEVEL_ADMIN
|
from deluge.core.authmanager import AUTH_LEVEL_ADMIN
|
||||||
|
from deluge.event import TorrentFolderRenamedEvent, TorrentStateChangedEvent
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -10,27 +10,26 @@
|
||||||
"""TorrentManager handles Torrent objects"""
|
"""TorrentManager handles Torrent objects"""
|
||||||
|
|
||||||
import cPickle
|
import cPickle
|
||||||
|
import logging
|
||||||
|
import operator
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import operator
|
|
||||||
import logging
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from twisted.internet.task import LoopingCall
|
|
||||||
from twisted.internet.defer import Deferred, DeferredList
|
|
||||||
from twisted.internet import reactor
|
from twisted.internet import reactor
|
||||||
|
from twisted.internet.defer import Deferred, DeferredList
|
||||||
|
from twisted.internet.task import LoopingCall
|
||||||
|
|
||||||
from deluge._libtorrent import lt
|
|
||||||
|
|
||||||
from deluge.event import (TorrentAddedEvent, PreTorrentRemovedEvent, TorrentRemovedEvent,
|
|
||||||
SessionStartedEvent, TorrentFinishedEvent, TorrentStateChangedEvent,
|
|
||||||
TorrentResumedEvent, TorrentFileRenamedEvent, TorrentFileCompletedEvent)
|
|
||||||
from deluge.error import InvalidTorrentError
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
from deluge._libtorrent import lt
|
||||||
|
from deluge.common import decode_string, get_magnet_info, utf8_encoded
|
||||||
from deluge.configmanager import ConfigManager, get_config_dir
|
from deluge.configmanager import ConfigManager, get_config_dir
|
||||||
from deluge.core.authmanager import AUTH_LEVEL_ADMIN
|
from deluge.core.authmanager import AUTH_LEVEL_ADMIN
|
||||||
from deluge.core.torrent import Torrent, TorrentOptions, sanitize_filepath
|
from deluge.core.torrent import sanitize_filepath, Torrent, TorrentOptions
|
||||||
from deluge.common import utf8_encoded, decode_string, get_magnet_info
|
from deluge.error import InvalidTorrentError
|
||||||
|
from deluge.event import (PreTorrentRemovedEvent, SessionStartedEvent, TorrentAddedEvent,
|
||||||
|
TorrentFileCompletedEvent, TorrentFileRenamedEvent, TorrentFinishedEvent,
|
||||||
|
TorrentRemovedEvent, TorrentResumedEvent, TorrentStateChangedEvent)
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
|
|
||||||
def proxy(proxy_func):
|
def proxy(proxy_func):
|
||||||
"""
|
"""
|
||||||
Factory class which returns a decorator that passes
|
Factory class which returns a decorator that passes
|
||||||
|
|
|
@ -32,15 +32,17 @@
|
||||||
# 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.
|
||||||
#
|
#
|
||||||
|
|
||||||
from twisted.web import client, http
|
|
||||||
from twisted.web.error import PageRedirect
|
|
||||||
from twisted.python.failure import Failure
|
|
||||||
from twisted.internet import reactor
|
|
||||||
from common import get_version
|
|
||||||
import logging
|
import logging
|
||||||
import os.path
|
import os.path
|
||||||
import zlib
|
import zlib
|
||||||
|
|
||||||
|
from twisted.internet import reactor
|
||||||
|
from twisted.python.failure import Failure
|
||||||
|
from twisted.web import client, http
|
||||||
|
from twisted.web.error import PageRedirect
|
||||||
|
|
||||||
|
from common import get_version
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
class HTTPDownloader(client.HTTPDownloader):
|
class HTTPDownloader(client.HTTPDownloader):
|
||||||
|
|
|
@ -36,13 +36,15 @@
|
||||||
|
|
||||||
"""Logging functions"""
|
"""Logging functions"""
|
||||||
|
|
||||||
import os
|
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
from deluge import common
|
import os
|
||||||
|
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
from twisted.python.log import PythonLoggingObserver
|
from twisted.python.log import PythonLoggingObserver
|
||||||
|
|
||||||
|
from deluge import common
|
||||||
|
|
||||||
__all__ = ["setupLogger", "setLoggerLevel", "getPluginLogger", "LOG"]
|
__all__ = ["setupLogger", "setLoggerLevel", "getPluginLogger", "LOG"]
|
||||||
|
|
||||||
LoggingLoggerClass = logging.getLoggerClass()
|
LoggingLoggerClass = logging.getLoggerClass()
|
||||||
|
|
|
@ -43,14 +43,14 @@ from __future__ import print_function
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from optparse import OptionParser
|
|
||||||
from logging import FileHandler, getLogger
|
|
||||||
from errno import EEXIST
|
from errno import EEXIST
|
||||||
|
from logging import FileHandler, getLogger
|
||||||
|
from optparse import OptionParser
|
||||||
|
|
||||||
from deluge.log import setupLogger
|
|
||||||
import deluge.error
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
import deluge.configmanager
|
import deluge.configmanager
|
||||||
|
import deluge.error
|
||||||
|
from deluge.log import setupLogger
|
||||||
|
|
||||||
|
|
||||||
def version_callback(option, opt_str, value, parser):
|
def version_callback(option, opt_str, value, parser):
|
||||||
|
|
|
@ -33,12 +33,13 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
from hashlib import sha1 as sha
|
from hashlib import sha1 as sha
|
||||||
|
|
||||||
from deluge.common import get_path_size
|
|
||||||
from deluge.bencode import bencode
|
from deluge.bencode import bencode
|
||||||
|
from deluge.common import get_path_size
|
||||||
|
|
||||||
|
|
||||||
class InvalidPath(Exception):
|
class InvalidPath(Exception):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
# Written by Bram Cohen
|
# Written by Bram Cohen
|
||||||
# Modifications for use in Deluge by Andrew Resch 2008
|
# Modifications for use in Deluge by Andrew Resch 2008
|
||||||
|
|
||||||
|
import logging
|
||||||
import os.path
|
import os.path
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import logging
|
|
||||||
from hashlib import sha1 as sha
|
from hashlib import sha1 as sha
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
def get_resource(filename):
|
def get_resource(filename):
|
||||||
import deluge
|
import deluge
|
||||||
return deluge.common.resource_filename("deluge.ui.gtkui", os.path.join("glade", filename))
|
return deluge.common.resource_filename("deluge.ui.gtkui", os.path.join("glade", filename))
|
||||||
|
|
|
@ -36,14 +36,14 @@
|
||||||
|
|
||||||
"""PluginManagerBase"""
|
"""PluginManagerBase"""
|
||||||
|
|
||||||
import os.path
|
|
||||||
import logging
|
import logging
|
||||||
|
import os.path
|
||||||
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
import deluge.configmanager
|
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
import deluge.configmanager
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,20 +13,21 @@
|
||||||
# See LICENSE for more details.
|
# See LICENSE for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
from deluge._libtorrent import lt
|
|
||||||
import shutil
|
|
||||||
import os
|
|
||||||
import logging
|
|
||||||
import base64
|
import base64
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
from twisted.internet import reactor
|
||||||
|
from twisted.internet.task import deferLater, LoopingCall
|
||||||
|
|
||||||
from deluge.plugins.pluginbase import CorePluginBase
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
import deluge.configmanager
|
import deluge.configmanager
|
||||||
|
from deluge._libtorrent import lt
|
||||||
from deluge.common import AUTH_LEVEL_ADMIN
|
from deluge.common import AUTH_LEVEL_ADMIN
|
||||||
from deluge.core.rpcserver import export
|
from deluge.core.rpcserver import export
|
||||||
from twisted.internet.task import LoopingCall, deferLater
|
|
||||||
from twisted.internet import reactor
|
|
||||||
from deluge.event import DelugeEvent
|
from deluge.event import DelugeEvent
|
||||||
|
from deluge.plugins.pluginbase import CorePluginBase
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -12,17 +12,18 @@
|
||||||
# See LICENSE for more details.
|
# See LICENSE for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
import gtk
|
|
||||||
import gtk.glade
|
|
||||||
import logging
|
import logging
|
||||||
from deluge.ui.client import client
|
|
||||||
from deluge.ui.gtkui import dialogs
|
|
||||||
from deluge.plugins.pluginbase import GtkPluginBase
|
|
||||||
import deluge.component as component
|
|
||||||
import deluge.common
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import gtk
|
||||||
|
import gtk.glade
|
||||||
|
|
||||||
|
import deluge.common
|
||||||
|
import deluge.component as component
|
||||||
from common import get_resource
|
from common import get_resource
|
||||||
|
from deluge.plugins.pluginbase import GtkPluginBase
|
||||||
|
from deluge.ui.client import client
|
||||||
|
from deluge.ui.gtkui import dialogs
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from deluge.plugins.pluginbase import WebPluginBase
|
|
||||||
|
|
||||||
from common import get_resource
|
from common import get_resource
|
||||||
|
from deluge.plugins.pluginbase import WebPluginBase
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See LICENSE for more details.
|
# See LICENSE for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
__plugin_name__ = "AutoAdd"
|
__plugin_name__ = "AutoAdd"
|
||||||
__author__ = "Chase Sterling, Pedro Algarvio"
|
__author__ = "Chase Sterling, Pedro Algarvio"
|
||||||
|
|
|
@ -7,11 +7,12 @@
|
||||||
# See LICENSE for more details.
|
# See LICENSE for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
import pkg_resources
|
|
||||||
import os.path
|
import os.path
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from sys import exc_info
|
from sys import exc_info
|
||||||
|
|
||||||
|
import pkg_resources
|
||||||
|
|
||||||
|
|
||||||
def get_resource(filename):
|
def get_resource(filename):
|
||||||
return pkg_resources.resource_filename("deluge.plugins.blocklist",
|
return pkg_resources.resource_filename("deluge.plugins.blocklist",
|
||||||
|
|
|
@ -8,26 +8,26 @@
|
||||||
# See LICENSE for more details.
|
# See LICENSE for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
|
||||||
import time
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import time
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from email.utils import formatdate
|
from email.utils import formatdate
|
||||||
from urlparse import urljoin
|
from urlparse import urljoin
|
||||||
import shutil
|
|
||||||
|
|
||||||
|
from twisted.internet import defer, threads
|
||||||
from twisted.internet.task import LoopingCall
|
from twisted.internet.task import LoopingCall
|
||||||
from twisted.internet import threads, defer
|
|
||||||
from twisted.web import error
|
from twisted.web import error
|
||||||
|
|
||||||
from deluge.plugins.pluginbase import CorePluginBase
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
import deluge.configmanager
|
import deluge.configmanager
|
||||||
|
from common import BadIP, IP
|
||||||
from deluge.common import is_url
|
from deluge.common import is_url
|
||||||
from deluge.core.rpcserver import export
|
from deluge.core.rpcserver import export
|
||||||
from deluge.httpdownloader import download_file
|
from deluge.httpdownloader import download_file
|
||||||
from common import IP, BadIP
|
from deluge.plugins.pluginbase import CorePluginBase
|
||||||
from detect import detect_compression, detect_format, create_reader, UnknownFormatError
|
from detect import create_reader, detect_compression, detect_format, UnknownFormatError
|
||||||
from readers import ReaderParseError
|
from readers import ReaderParseError
|
||||||
|
|
||||||
# TODO: check return values for deferred callbacks
|
# TODO: check return values for deferred callbacks
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
# See LICENSE for more details.
|
# See LICENSE for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import bz2
|
||||||
import gzip
|
import gzip
|
||||||
import zipfile
|
import zipfile
|
||||||
import bz2
|
|
||||||
|
|
||||||
|
|
||||||
def Zipped(reader):
|
def Zipped(reader):
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
# See LICENSE for more details.
|
# See LICENSE for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
from decompressers import Zipped, GZipped, BZipped2
|
from decompressers import BZipped2, GZipped, Zipped
|
||||||
from readers import EmuleReader, SafePeerReader, PeerGuardianReader
|
from readers import EmuleReader, PeerGuardianReader, SafePeerReader
|
||||||
|
|
||||||
COMPRESSION_TYPES = {
|
COMPRESSION_TYPES = {
|
||||||
"PK": "Zip",
|
"PK": "Zip",
|
||||||
|
|
|
@ -9,14 +9,15 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
|
|
||||||
from deluge.ui.client import client
|
|
||||||
import deluge.component as component
|
|
||||||
import deluge.common
|
|
||||||
from deluge.plugins.pluginbase import GtkPluginBase
|
|
||||||
import common
|
import common
|
||||||
|
import deluge.common
|
||||||
|
import deluge.component as component
|
||||||
|
from deluge.plugins.pluginbase import GtkPluginBase
|
||||||
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
# See LICENSE for more details.
|
# See LICENSE for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import gzip
|
||||||
import logging
|
import logging
|
||||||
|
import socket
|
||||||
from exceptions import Exception
|
from exceptions import Exception
|
||||||
from struct import unpack
|
from struct import unpack
|
||||||
import gzip
|
|
||||||
import socket
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from common import raises_errors_as, IP, BadIP
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from common import BadIP, IP, raises_errors_as
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,9 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from deluge.plugins.pluginbase import WebPluginBase
|
|
||||||
from common import get_resource
|
from common import get_resource
|
||||||
|
from deluge.plugins.pluginbase import WebPluginBase
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# See LICENSE for more details.
|
# See LICENSE for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
__plugin_name__ = "Blocklist"
|
__plugin_name__ = "Blocklist"
|
||||||
__author__ = "John Garland"
|
__author__ = "John Garland"
|
||||||
|
|
|
@ -33,9 +33,11 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import pkg_resources
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
|
import pkg_resources
|
||||||
|
|
||||||
|
|
||||||
def get_resource(filename):
|
def get_resource(filename):
|
||||||
return pkg_resources.resource_filename("deluge.plugins.execute",
|
return pkg_resources.resource_filename("deluge.plugins.execute",
|
||||||
os.path.join("data", filename))
|
os.path.join("data", filename))
|
||||||
|
|
|
@ -33,18 +33,19 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
|
||||||
import time
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
|
||||||
from twisted.internet.utils import getProcessOutputAndValue
|
from twisted.internet.utils import getProcessOutputAndValue
|
||||||
|
|
||||||
from deluge.plugins.pluginbase import CorePluginBase
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
from deluge.common import utf8_encoded
|
||||||
from deluge.configmanager import ConfigManager
|
from deluge.configmanager import ConfigManager
|
||||||
from deluge.core.rpcserver import export
|
from deluge.core.rpcserver import export
|
||||||
from deluge.event import DelugeEvent
|
from deluge.event import DelugeEvent
|
||||||
from deluge.common import utf8_encoded
|
from deluge.plugins.pluginbase import CorePluginBase
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -33,16 +33,18 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import gtk
|
|
||||||
import gtk.glade
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from deluge.ui.client import client
|
import gtk
|
||||||
from deluge.plugins.pluginbase import GtkPluginBase
|
import gtk.glade
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
from deluge.plugins.pluginbase import GtkPluginBase
|
||||||
|
from deluge.ui.client import client
|
||||||
|
|
||||||
|
from . import common
|
||||||
|
|
||||||
# Relative import
|
# Relative import
|
||||||
from . import common
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,11 @@
|
||||||
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from deluge.ui.client import client
|
|
||||||
from deluge import component
|
|
||||||
from deluge.plugins.pluginbase import WebPluginBase
|
|
||||||
|
|
||||||
from common import get_resource
|
from common import get_resource
|
||||||
|
from deluge import component
|
||||||
|
from deluge.plugins.pluginbase import WebPluginBase
|
||||||
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
__plugin_name__ = "Execute"
|
__plugin_name__ = "Execute"
|
||||||
__author__ = "Damien Churchill"
|
__author__ = "Damien Churchill"
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,17 +11,17 @@
|
||||||
# See LICENSE for more details.
|
# See LICENSE for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
from twisted.internet.utils import getProcessValue
|
from twisted.internet.utils import getProcessValue
|
||||||
from twisted.python.procutils import which
|
from twisted.python.procutils import which
|
||||||
|
|
||||||
from deluge.plugins.pluginbase import CorePluginBase
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
import deluge.configmanager
|
import deluge.configmanager
|
||||||
from deluge.core.rpcserver import export
|
|
||||||
from deluge.common import windows_check
|
from deluge.common import windows_check
|
||||||
|
from deluge.core.rpcserver import export
|
||||||
|
from deluge.plugins.pluginbase import CorePluginBase
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -11,15 +11,15 @@
|
||||||
# See LICENSE for more details.
|
# See LICENSE for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
import gtk
|
|
||||||
import gtk.glade
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from deluge.ui.client import client
|
import gtk
|
||||||
from deluge.plugins.pluginbase import GtkPluginBase
|
import gtk.glade
|
||||||
import deluge.component as component
|
|
||||||
|
|
||||||
|
import deluge.component as component
|
||||||
from deluge.plugins.extractor.common import get_resource
|
from deluge.plugins.extractor.common import get_resource
|
||||||
|
from deluge.plugins.pluginbase import GtkPluginBase
|
||||||
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from deluge.plugins.pluginbase import WebPluginBase
|
|
||||||
|
|
||||||
from deluge.plugins.extractor.common import get_resource
|
from deluge.plugins.extractor.common import get_resource
|
||||||
|
from deluge.plugins.pluginbase import WebPluginBase
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# See LICENSE for more details.
|
# See LICENSE for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
__plugin_name__ = "Extractor"
|
__plugin_name__ = "Extractor"
|
||||||
__author__ = "Andrew Resch"
|
__author__ = "Andrew Resch"
|
||||||
|
|
|
@ -38,14 +38,14 @@ adds a status field for tracker.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from deluge.plugins.pluginbase import CorePluginBase
|
import re
|
||||||
from deluge.core.rpcserver import export
|
import traceback
|
||||||
from deluge.configmanager import ConfigManager
|
|
||||||
import deluge.component as component
|
|
||||||
from urlparse import urlparse
|
from urlparse import urlparse
|
||||||
|
|
||||||
import traceback
|
import deluge.component as component
|
||||||
import re
|
from deluge.configmanager import ConfigManager
|
||||||
|
from deluge.core.rpcserver import export
|
||||||
|
from deluge.plugins.pluginbase import CorePluginBase
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -33,13 +33,15 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
import os
|
import pkg_resources # access plugin egg
|
||||||
import logging
|
|
||||||
import pkg_resources # access plugin egg
|
|
||||||
import deluge.component as component
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
import deluge.component as component
|
||||||
from deluge.ui.client import client
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
|
@ -35,12 +35,13 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
import gtk
|
|
||||||
import gtk.glade
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import deluge.component as component
|
import gtk
|
||||||
|
import gtk.glade
|
||||||
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
import deluge.component as component
|
||||||
from deluge.ui.client import client
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
|
@ -34,11 +34,14 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
import pkg_resources # access plugin egg
|
import os
|
||||||
from deluge import component # for systray
|
|
||||||
import gtk, gobject
|
import gobject
|
||||||
|
import gtk
|
||||||
|
import pkg_resources # access plugin egg
|
||||||
|
|
||||||
|
from deluge import component # for systray
|
||||||
from deluge.ui.client import client
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
from __future__ import print_function
|
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
|
@ -32,6 +31,8 @@ from __future__ import print_function
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
from deluge.ui.client import sclient
|
from deluge.ui.client import sclient
|
||||||
|
|
||||||
sclient.set_core_uri()
|
sclient.set_core_uri()
|
||||||
|
|
|
@ -37,13 +37,15 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
from deluge.common import fspeed
|
|
||||||
from deluge.ui.client import client
|
|
||||||
from deluge.plugins.pluginbase import WebPluginBase
|
|
||||||
from deluge import component
|
from deluge import component
|
||||||
|
from deluge.common import fspeed
|
||||||
|
from deluge.plugins.pluginbase import WebPluginBase
|
||||||
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
__plugin_name__ = "Label"
|
__plugin_name__ = "Label"
|
||||||
__author__ = "Martijn Voncken"
|
__author__ = "Martijn Voncken"
|
||||||
|
|
|
@ -38,7 +38,9 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from deluge import component
|
from deluge import component
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -141,4 +143,3 @@ class CustomNotifications(object):
|
||||||
def _on_notify_failure(self, failure, kind):
|
def _on_notify_failure(self, failure, kind):
|
||||||
log.debug("Notification failure using %s: %s", kind, failure)
|
log.debug("Notification failure using %s: %s", kind, failure)
|
||||||
return failure
|
return failure
|
||||||
|
|
||||||
|
|
|
@ -37,17 +37,18 @@
|
||||||
# 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 smtplib
|
|
||||||
import logging
|
import logging
|
||||||
|
import smtplib
|
||||||
from email.utils import formatdate
|
from email.utils import formatdate
|
||||||
|
|
||||||
from twisted.internet import defer, threads
|
from twisted.internet import defer, threads
|
||||||
|
|
||||||
|
import deluge.configmanager
|
||||||
|
from common import CustomNotifications
|
||||||
from deluge import component
|
from deluge import component
|
||||||
|
from deluge.core.rpcserver import export
|
||||||
from deluge.event import known_events
|
from deluge.event import known_events
|
||||||
from deluge.plugins.pluginbase import CorePluginBase
|
from deluge.plugins.pluginbase import CorePluginBase
|
||||||
import deluge.configmanager
|
|
||||||
from deluge.core.rpcserver import export
|
|
||||||
|
|
||||||
from common import CustomNotifications
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -39,18 +39,19 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from os.path import basename
|
from os.path import basename
|
||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
|
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
from deluge.ui.client import client
|
|
||||||
from deluge.plugins.pluginbase import GtkPluginBase
|
|
||||||
import deluge.component as component
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
import deluge.component as component
|
||||||
import deluge.configmanager
|
import deluge.configmanager
|
||||||
|
from common import CustomNotifications, get_resource
|
||||||
|
from deluge.plugins.pluginbase import GtkPluginBase
|
||||||
|
from deluge.ui.client import client
|
||||||
|
|
||||||
# Relative imports
|
# Relative imports
|
||||||
from common import get_resource, CustomNotifications
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -710,4 +711,3 @@ class GtkUI(GtkPluginBase, GtkUiNotifications):
|
||||||
self.subscriptions_model[path][SUB_NOT_SOUND] = \
|
self.subscriptions_model[path][SUB_NOT_SOUND] = \
|
||||||
not self.subscriptions_model[path][SUB_NOT_SOUND]
|
not self.subscriptions_model[path][SUB_NOT_SOUND]
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from twisted.internet import task
|
from twisted.internet import task
|
||||||
|
|
||||||
from deluge import component
|
from deluge import component
|
||||||
from deluge.event import DelugeEvent
|
from deluge.event import DelugeEvent
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,11 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from deluge.ui.client import client
|
|
||||||
|
from common import get_resource
|
||||||
from deluge import component
|
from deluge import component
|
||||||
from deluge.plugins.pluginbase import WebPluginBase
|
from deluge.plugins.pluginbase import WebPluginBase
|
||||||
from common import get_resource
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -54,4 +55,4 @@ class WebUI(WebPluginBase):
|
||||||
log.debug("Enabling Web UI notifications")
|
log.debug("Enabling Web UI notifications")
|
||||||
|
|
||||||
def disable(self):
|
def disable(self):
|
||||||
log.debug("Disabling Web UI notifications")
|
log.debug("Disabling Web UI notifications")
|
||||||
|
|
|
@ -37,7 +37,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.
|
||||||
#
|
#
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
__plugin_name__ = "Notifications"
|
__plugin_name__ = "Notifications"
|
||||||
__author__ = "Pedro Algarvio"
|
__author__ = "Pedro Algarvio"
|
||||||
|
|
|
@ -36,15 +36,16 @@
|
||||||
# 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 time
|
|
||||||
import logging
|
import logging
|
||||||
from deluge.plugins.pluginbase import CorePluginBase
|
import time
|
||||||
|
|
||||||
|
from twisted.internet import reactor
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
import deluge.configmanager
|
import deluge.configmanager
|
||||||
from deluge.core.rpcserver import export
|
from deluge.core.rpcserver import export
|
||||||
from deluge.event import DelugeEvent
|
from deluge.event import DelugeEvent
|
||||||
|
from deluge.plugins.pluginbase import CorePluginBase
|
||||||
from twisted.internet import reactor
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -36,14 +36,15 @@
|
||||||
# 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 gtk
|
|
||||||
import logging
|
import logging
|
||||||
from deluge.ui.client import client
|
|
||||||
from deluge.plugins.pluginbase import GtkPluginBase
|
|
||||||
import deluge.component as component
|
|
||||||
import deluge.common
|
|
||||||
|
|
||||||
|
import gtk
|
||||||
|
|
||||||
|
import deluge.common
|
||||||
|
import deluge.component as component
|
||||||
from common import get_resource
|
from common import get_resource
|
||||||
|
from deluge.plugins.pluginbase import GtkPluginBase
|
||||||
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -37,11 +37,11 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from deluge.ui.client import client
|
|
||||||
from deluge import component
|
|
||||||
from deluge.plugins.pluginbase import WebPluginBase
|
|
||||||
|
|
||||||
from common import get_resource
|
from common import get_resource
|
||||||
|
from deluge import component
|
||||||
|
from deluge.plugins.pluginbase import WebPluginBase
|
||||||
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,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.
|
||||||
#
|
#
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
__plugin_name__ = "Scheduler"
|
__plugin_name__ = "Scheduler"
|
||||||
__author__ = "Andrew Resch"
|
__author__ = "Andrew Resch"
|
||||||
|
|
|
@ -32,8 +32,10 @@
|
||||||
# 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 pkg_resources
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
|
import pkg_resources
|
||||||
|
|
||||||
|
|
||||||
def get_resource(filename):
|
def get_resource(filename):
|
||||||
return pkg_resources.resource_filename("deluge.plugins.stats", os.path.join("data", filename))
|
return pkg_resources.resource_filename("deluge.plugins.stats", os.path.join("data", filename))
|
||||||
|
|
|
@ -33,14 +33,14 @@
|
||||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||||
# this exception statement from your version. If you delete this exception
|
# this exception statement from your version. If you delete this exception
|
||||||
|
|
||||||
import time
|
|
||||||
import logging
|
import logging
|
||||||
|
import time
|
||||||
|
|
||||||
from twisted.internet.task import LoopingCall
|
from twisted.internet.task import LoopingCall
|
||||||
|
|
||||||
from deluge.plugins.pluginbase import CorePluginBase
|
from deluge import component, configmanager
|
||||||
from deluge import component
|
|
||||||
from deluge import configmanager
|
|
||||||
from deluge.core.rpcserver import export
|
from deluge.core.rpcserver import export
|
||||||
|
from deluge.plugins.pluginbase import CorePluginBase
|
||||||
|
|
||||||
DEFAULT_PREFS = {
|
DEFAULT_PREFS = {
|
||||||
"test": "NiNiNi",
|
"test": "NiNiNi",
|
||||||
|
|
|
@ -37,10 +37,12 @@
|
||||||
"""
|
"""
|
||||||
port of old plugin by markybob.
|
port of old plugin by markybob.
|
||||||
"""
|
"""
|
||||||
import time
|
|
||||||
import math
|
|
||||||
import cairo
|
|
||||||
import logging
|
import logging
|
||||||
|
import math
|
||||||
|
import time
|
||||||
|
|
||||||
|
import cairo
|
||||||
|
|
||||||
from deluge.ui.client import client
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
|
@ -35,21 +35,21 @@
|
||||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||||
# this exception statement from your version. If you delete this exception
|
# this exception statement from your version. If you delete this exception
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
|
import gobject
|
||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
import gobject
|
|
||||||
import logging
|
|
||||||
from gtk.glade import XML
|
from gtk.glade import XML
|
||||||
|
|
||||||
import graph
|
import common
|
||||||
import deluge
|
import deluge
|
||||||
|
import graph
|
||||||
from deluge import component
|
from deluge import component
|
||||||
from deluge.common import fspeed
|
from deluge.common import fspeed
|
||||||
|
from deluge.plugins.pluginbase import GtkPluginBase
|
||||||
from deluge.ui.client import client
|
from deluge.ui.client import client
|
||||||
from deluge.ui.gtkui.torrentdetails import Tab
|
from deluge.ui.gtkui.torrentdetails import Tab
|
||||||
from deluge.plugins.pluginbase import GtkPluginBase
|
|
||||||
|
|
||||||
import common
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from deluge.ui.client import sclient, aclient
|
|
||||||
sclient.set_core_uri()
|
|
||||||
import graph
|
|
||||||
import deluge
|
import deluge
|
||||||
|
import graph
|
||||||
|
from deluge.ui.client import aclient, sclient
|
||||||
|
|
||||||
|
sclient.set_core_uri()
|
||||||
|
|
||||||
def test_sync():
|
def test_sync():
|
||||||
if 1:
|
if 1:
|
||||||
|
@ -76,4 +78,4 @@ def test_write():
|
||||||
#test_sync()
|
#test_sync()
|
||||||
test_async()
|
test_async()
|
||||||
test_dht()
|
test_dht()
|
||||||
#test_write()
|
#test_write()
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from deluge.ui.client import sclient, aclient
|
|
||||||
from deluge.common import fsize
|
from deluge.common import fsize
|
||||||
|
from deluge.ui.client import aclient, sclient
|
||||||
|
|
||||||
sclient.set_core_uri()
|
sclient.set_core_uri()
|
||||||
|
|
||||||
def print_totals(totals):
|
def print_totals(totals):
|
||||||
|
@ -17,8 +19,3 @@ print_totals(sclient.stats_get_totals())
|
||||||
|
|
||||||
print("==session totals==")
|
print("==session totals==")
|
||||||
print_totals(sclient.stats_get_session_totals())
|
print_totals(sclient.stats_get_session_totals())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,11 +38,11 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from deluge.ui.client import client
|
|
||||||
from deluge import component
|
|
||||||
from deluge.plugins.pluginbase import WebPluginBase
|
|
||||||
|
|
||||||
from common import get_resource
|
from common import get_resource
|
||||||
|
from deluge import component
|
||||||
|
from deluge.plugins.pluginbase import WebPluginBase
|
||||||
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
# but you are not obligated to do so. If you do not wish to do so, delete
|
||||||
# this exception statement from your version. If you delete this exception
|
# this exception statement from your version. If you delete this exception
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
__plugin_name__ = "Stats"
|
__plugin_name__ = "Stats"
|
||||||
__author__ = "Ian Martin"
|
__author__ = "Ian Martin"
|
||||||
|
|
|
@ -38,10 +38,11 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from deluge.plugins.pluginbase import CorePluginBase
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
import deluge.configmanager
|
import deluge.configmanager
|
||||||
from deluge.core.rpcserver import export
|
from deluge.core.rpcserver import export
|
||||||
|
from deluge.plugins.pluginbase import CorePluginBase
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -37,15 +37,15 @@
|
||||||
# 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 gtk
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from deluge.ui.client import client
|
import gtk
|
||||||
from deluge.plugins.pluginbase import GtkPluginBase
|
|
||||||
import deluge.component as component
|
|
||||||
import deluge.common
|
|
||||||
|
|
||||||
|
import deluge.common
|
||||||
|
import deluge.component as component
|
||||||
from common import get_resource
|
from common import get_resource
|
||||||
|
from deluge.plugins.pluginbase import GtkPluginBase
|
||||||
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -38,11 +38,11 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from deluge.ui.client import client
|
|
||||||
from deluge import component
|
|
||||||
from deluge.plugins.pluginbase import WebPluginBase
|
|
||||||
|
|
||||||
from common import get_resource
|
from common import get_resource
|
||||||
|
from deluge import component
|
||||||
|
from deluge.plugins.pluginbase import WebPluginBase
|
||||||
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,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.
|
||||||
#
|
#
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
__plugin_name__ = "Toggle"
|
__plugin_name__ = "Toggle"
|
||||||
__author__ = "John Garland"
|
__author__ = "John Garland"
|
||||||
|
|
|
@ -36,12 +36,12 @@
|
||||||
# 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
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
from deluge import common, component, configmanager
|
from deluge import common, component, configmanager
|
||||||
from deluge.plugins.pluginbase import CorePluginBase
|
|
||||||
from deluge.core.rpcserver import export
|
from deluge.core.rpcserver import export
|
||||||
|
from deluge.plugins.pluginbase import CorePluginBase
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -36,16 +36,16 @@
|
||||||
# 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 gtk
|
|
||||||
import gtk.glade
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from deluge.ui.client import client
|
import gtk
|
||||||
from deluge.plugins.pluginbase import GtkPluginBase
|
import gtk.glade
|
||||||
import deluge.component as component
|
|
||||||
import deluge.common
|
|
||||||
|
|
||||||
|
import deluge.common
|
||||||
|
import deluge.component as component
|
||||||
from common import get_resource
|
from common import get_resource
|
||||||
|
from deluge.plugins.pluginbase import GtkPluginBase
|
||||||
|
from deluge.ui.client import client
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,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.
|
||||||
#
|
#
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
__plugin_name__ = "WebUi"
|
__plugin_name__ = "WebUi"
|
||||||
__author__ = "Damien Churchill"
|
__author__ = "Damien Churchill"
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
|
@ -64,6 +64,8 @@ __all__ = ['dumps', 'loads']
|
||||||
|
|
||||||
import struct
|
import struct
|
||||||
from threading import Lock
|
from threading import Lock
|
||||||
|
from types import (DictType, FloatType, IntType, ListType, LongType, NoneType, StringType, TupleType,
|
||||||
|
UnicodeType)
|
||||||
|
|
||||||
# Default number of bits for serialized floats, either 32 or 64 (also a parameter for dumps()).
|
# Default number of bits for serialized floats, either 32 or 64 (also a parameter for dumps()).
|
||||||
DEFAULT_FLOAT_BITS = 32
|
DEFAULT_FLOAT_BITS = 32
|
||||||
|
@ -295,7 +297,6 @@ def loads(x, decode_utf8=False):
|
||||||
raise ValueError
|
raise ValueError
|
||||||
return r
|
return r
|
||||||
|
|
||||||
from types import StringType, IntType, LongType, DictType, ListType, TupleType, FloatType, NoneType, UnicodeType
|
|
||||||
|
|
||||||
|
|
||||||
def encode_int(x, r):
|
def encode_int(x, r):
|
||||||
|
|
|
@ -8,11 +8,13 @@ python create_plugin.py --name MyPlugin2 --basepath . --author-name "Your Name"
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
from datetime import datetime
|
|
||||||
from optparse import OptionParser
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
from datetime import datetime
|
||||||
|
from optparse import OptionParser
|
||||||
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
|
||||||
parser = OptionParser()
|
parser = OptionParser()
|
||||||
parser.add_option("-n", "--name", dest="name", help="plugin name")
|
parser.add_option("-n", "--name", dest="name", help="plugin name")
|
||||||
parser.add_option("-m", "--module-name", dest="module", help="plugin name")
|
parser.add_option("-m", "--module-name", dest="module", help="plugin name")
|
||||||
|
|
|
@ -11,10 +11,10 @@
|
||||||
#
|
#
|
||||||
# Authour: Garett Harnish
|
# Authour: Garett Harnish
|
||||||
|
|
||||||
from sys import argv, exit, stderr
|
|
||||||
from optparse import OptionParser
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
from optparse import OptionParser
|
||||||
|
from sys import argv, exit, stderr
|
||||||
|
|
||||||
|
|
||||||
def isFloatDigit (string):
|
def isFloatDigit (string):
|
||||||
if string.isdigit():
|
if string.isdigit():
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
from __future__ import print_function
|
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
|
@ -37,11 +36,15 @@ from __future__ import print_function
|
||||||
#client doc's For core.
|
#client doc's For core.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
|
import inspect
|
||||||
|
import pydoc
|
||||||
|
import textwrap
|
||||||
|
|
||||||
from deluge.core.core import Core
|
from deluge.core.core import Core
|
||||||
from deluge.ui.client import aclient, sclient
|
from deluge.ui.client import aclient, sclient
|
||||||
import pydoc
|
|
||||||
import inspect
|
|
||||||
import textwrap
|
|
||||||
sclient.set_core_uri()
|
sclient.set_core_uri()
|
||||||
print("\n\n")
|
print("\n\n")
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
|
||||||
import tempfile
|
import tempfile
|
||||||
from subprocess import Popen, PIPE
|
import time
|
||||||
|
from subprocess import PIPE, Popen
|
||||||
|
|
||||||
|
from twisted.internet.error import CannotListenError
|
||||||
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
import deluge.configmanager
|
import deluge.configmanager
|
||||||
import deluge.log
|
import deluge.log
|
||||||
from twisted.internet.error import CannotListenError
|
|
||||||
|
|
||||||
deluge.log.setupLogger("none")
|
deluge.log.setupLogger("none")
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
|
|
||||||
from deluge.core.authmanager import AuthManager, AUTH_LEVEL_ADMIN
|
from deluge.core.authmanager import AUTH_LEVEL_ADMIN, AuthManager
|
||||||
|
|
||||||
|
|
||||||
class AuthManagerTestCase(unittest.TestCase):
|
class AuthManagerTestCase(unittest.TestCase):
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
from twisted.internet.error import CannotListenError
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
|
|
||||||
import deluge.tests.common as common
|
import deluge.tests.common as common
|
||||||
from twisted.internet.error import CannotListenError
|
|
||||||
from deluge import error
|
from deluge import error
|
||||||
from deluge.core.authmanager import AUTH_LEVEL_ADMIN
|
from deluge.core.authmanager import AUTH_LEVEL_ADMIN
|
||||||
from deluge.ui.client import client, Client, DaemonSSLProxy
|
from deluge.ui.client import Client, client, DaemonSSLProxy
|
||||||
|
|
||||||
|
|
||||||
class NoVersionSendingDaemonSSLProxy(DaemonSSLProxy):
|
class NoVersionSendingDaemonSSLProxy(DaemonSSLProxy):
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
from deluge.common import (setup_translations, VersionSplit, fsize, fpcnt, fspeed, fpeer,
|
|
||||||
ftime, fdate, is_url, is_magnet, get_path_size, is_ip)
|
from deluge.common import (fdate, fpcnt, fpeer, fsize, fspeed, ftime, get_path_size, is_ip, is_magnet, is_url,
|
||||||
|
setup_translations, VersionSplit)
|
||||||
|
|
||||||
|
|
||||||
class CommonTestCase(unittest.TestCase):
|
class CommonTestCase(unittest.TestCase):
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from twisted.trial import unittest
|
|
||||||
from twisted.internet import threads
|
from twisted.internet import threads
|
||||||
|
from twisted.trial import unittest
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from twisted.trial import unittest
|
|
||||||
from twisted.internet import task
|
from twisted.internet import task
|
||||||
from deluge.tests.common import set_tmp_config_dir
|
from twisted.trial import unittest
|
||||||
from deluge.config import Config
|
|
||||||
import deluge.config
|
import deluge.config
|
||||||
|
from deluge.config import Config
|
||||||
|
from deluge.tests.common import set_tmp_config_dir
|
||||||
|
|
||||||
DEFAULTS = {"string": "foobar", "int": 1, "float": 0.435, "bool": True, "unicode": u"foobar"}
|
DEFAULTS = {"string": "foobar", "int": 1, "float": 0.435, "bool": True, "unicode": u"foobar"}
|
||||||
|
|
||||||
|
|
|
@ -2,23 +2,24 @@ import os
|
||||||
import warnings
|
import warnings
|
||||||
from hashlib import sha1 as sha
|
from hashlib import sha1 as sha
|
||||||
|
|
||||||
from twisted.trial import unittest
|
|
||||||
from twisted.internet import reactor
|
from twisted.internet import reactor
|
||||||
|
from twisted.internet.error import CannotListenError
|
||||||
from twisted.python.failure import Failure
|
from twisted.python.failure import Failure
|
||||||
|
from twisted.trial import unittest
|
||||||
from twisted.web.http import FORBIDDEN
|
from twisted.web.http import FORBIDDEN
|
||||||
from twisted.web.resource import Resource
|
from twisted.web.resource import Resource
|
||||||
from twisted.web.server import Site
|
from twisted.web.server import Site
|
||||||
from twisted.web.static import File
|
from twisted.web.static import File
|
||||||
from twisted.internet.error import CannotListenError
|
|
||||||
|
|
||||||
import deluge.tests.common as common
|
|
||||||
from deluge.core.rpcserver import RPCServer
|
|
||||||
from deluge.core.core import Core
|
|
||||||
warnings.filterwarnings("ignore", category=RuntimeWarning)
|
|
||||||
from deluge.ui.web.common import compress
|
|
||||||
warnings.resetwarnings()
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
import deluge.error
|
import deluge.error
|
||||||
|
import deluge.tests.common as common
|
||||||
|
from deluge.core.core import Core
|
||||||
|
from deluge.core.rpcserver import RPCServer
|
||||||
|
from deluge.ui.web.common import compress
|
||||||
|
|
||||||
|
warnings.filterwarnings("ignore", category=RuntimeWarning)
|
||||||
|
warnings.resetwarnings()
|
||||||
|
|
||||||
rpath = common.rpath
|
rpath = common.rpath
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
|
|
||||||
import deluge.error
|
import deluge.error
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,29 @@
|
||||||
import warnings
|
import warnings
|
||||||
|
from email.utils import formatdate
|
||||||
|
|
||||||
from twisted.trial import unittest
|
|
||||||
from twisted.internet import reactor
|
from twisted.internet import reactor
|
||||||
from twisted.python.failure import Failure
|
|
||||||
from twisted.internet.error import CannotListenError
|
from twisted.internet.error import CannotListenError
|
||||||
|
from twisted.python.failure import Failure
|
||||||
|
from twisted.trial import unittest
|
||||||
from twisted.web.http import NOT_MODIFIED
|
from twisted.web.http import NOT_MODIFIED
|
||||||
|
from twisted.web.server import Site
|
||||||
|
|
||||||
|
import deluge.tests.common as common
|
||||||
|
from deluge.httpdownloader import download_file
|
||||||
|
from deluge.log import setupLogger
|
||||||
|
from deluge.ui.web.common import compress
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from twisted.web.resource import Resource
|
from twisted.web.resource import Resource
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# twisted 8
|
# twisted 8
|
||||||
from twisted.web.error import Resource
|
from twisted.web.error import Resource
|
||||||
from twisted.web.server import Site
|
|
||||||
|
|
||||||
from deluge.httpdownloader import download_file
|
|
||||||
from deluge.log import setupLogger
|
|
||||||
|
|
||||||
warnings.filterwarnings("ignore", category=RuntimeWarning)
|
warnings.filterwarnings("ignore", category=RuntimeWarning)
|
||||||
from deluge.ui.web.common import compress
|
|
||||||
warnings.resetwarnings()
|
warnings.resetwarnings()
|
||||||
|
|
||||||
from email.utils import formatdate
|
|
||||||
|
|
||||||
import deluge.tests.common as common
|
|
||||||
rpath = common.rpath
|
rpath = common.rpath
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
|
|
||||||
from deluge.log import setupLogger
|
from deluge.log import setupLogger
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
from twisted.trial import unittest
|
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
from twisted.trial import unittest
|
||||||
|
|
||||||
from deluge import maketorrent
|
from deluge import maketorrent
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import deluge.pluginmanagerbase
|
import deluge.pluginmanagerbase
|
||||||
|
|
||||||
pm = deluge.pluginmanagerbase.PluginManagerBase("core.conf", "deluge.plugin.core")
|
pm = deluge.pluginmanagerbase.PluginManagerBase("core.conf", "deluge.plugin.core")
|
||||||
|
|
||||||
for p in pm.get_available_plugins():
|
for p in pm.get_available_plugins():
|
||||||
|
|
|
@ -35,17 +35,16 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from twisted.trial import unittest
|
|
||||||
from twisted.python import log
|
from twisted.python import log
|
||||||
|
from twisted.trial import unittest
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
import deluge.error
|
import deluge.error
|
||||||
from deluge.core import rpcserver
|
from deluge.core import rpcserver
|
||||||
from deluge.ui.common import get_localhost_auth
|
|
||||||
from deluge.core.authmanager import AuthManager
|
from deluge.core.authmanager import AuthManager
|
||||||
from deluge.core.rpcserver import RPCServer, DelugeRPCProtocol
|
from deluge.core.rpcserver import DelugeRPCProtocol, RPCServer
|
||||||
|
|
||||||
from deluge.log import setupLogger
|
from deluge.log import setupLogger
|
||||||
|
from deluge.ui.common import get_localhost_auth
|
||||||
|
|
||||||
setupLogger("none")
|
setupLogger("none")
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import time
|
import time
|
||||||
from twisted.trial import unittest
|
|
||||||
from twisted.internet.defer import maybeDeferred, succeed
|
from twisted.internet.defer import maybeDeferred, succeed
|
||||||
import deluge.ui.sessionproxy
|
from twisted.trial import unittest
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
|
import deluge.ui.sessionproxy
|
||||||
|
|
||||||
|
|
||||||
class Core(object):
|
class Core(object):
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue