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