Remove some imports that are no longer neccessary
This commit is contained in:
parent
db46a97263
commit
9ac0d62149
|
@ -40,7 +40,6 @@ import os
|
||||||
import time
|
import time
|
||||||
import subprocess
|
import subprocess
|
||||||
import platform
|
import platform
|
||||||
import sys
|
|
||||||
import chardet
|
import chardet
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|
|
@ -38,18 +38,10 @@ from deluge._libtorrent import lt
|
||||||
import os
|
import os
|
||||||
import glob
|
import glob
|
||||||
import base64
|
import base64
|
||||||
import shutil
|
|
||||||
import logging
|
import logging
|
||||||
import threading
|
import threading
|
||||||
import pkg_resources
|
|
||||||
import warnings
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
|
||||||
from twisted.internet import reactor, defer
|
|
||||||
from twisted.internet.task import LoopingCall
|
|
||||||
import twisted.web.client
|
|
||||||
|
|
||||||
from deluge.httpdownloader import download_file
|
from deluge.httpdownloader import download_file
|
||||||
|
|
||||||
import deluge.configmanager
|
import deluge.configmanager
|
||||||
|
|
|
@ -37,8 +37,6 @@
|
||||||
"""PluginManager for Core"""
|
"""PluginManager for Core"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from twisted.internet import reactor
|
|
||||||
from twisted.internet.task import LoopingCall
|
|
||||||
|
|
||||||
from deluge.event import PluginEnabledEvent, PluginDisabledEvent
|
from deluge.event import PluginEnabledEvent, PluginDisabledEvent
|
||||||
import deluge.pluginmanagerbase
|
import deluge.pluginmanagerbase
|
||||||
|
|
|
@ -43,7 +43,7 @@ import logging
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from twisted.internet.protocol import Factory, Protocol
|
from twisted.internet.protocol import Factory, Protocol
|
||||||
from twisted.internet import ssl, reactor, defer
|
from twisted.internet import reactor, defer
|
||||||
|
|
||||||
from OpenSSL import crypto, SSL
|
from OpenSSL import crypto, SSL
|
||||||
from types import FunctionType
|
from types import FunctionType
|
||||||
|
|
|
@ -44,7 +44,6 @@ import operator
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from twisted.internet import reactor
|
|
||||||
from twisted.internet.task import LoopingCall
|
from twisted.internet.task import LoopingCall
|
||||||
|
|
||||||
from deluge._libtorrent import lt
|
from deluge._libtorrent import lt
|
||||||
|
@ -569,7 +568,7 @@ class TorrentManager(component.Component):
|
||||||
# Remove the torrent from deluge's session
|
# Remove the torrent from deluge's session
|
||||||
try:
|
try:
|
||||||
del self.torrents[torrent_id]
|
del self.torrents[torrent_id]
|
||||||
except KeyError, ValueError:
|
except (KeyError, ValueError):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Save the session state
|
# Save the session state
|
||||||
|
|
|
@ -38,7 +38,7 @@ import os
|
||||||
from hashlib import sha1 as sha
|
from hashlib import sha1 as sha
|
||||||
|
|
||||||
from deluge.common import get_path_size
|
from deluge.common import get_path_size
|
||||||
from deluge.bencode import bencode, bdecode
|
from deluge.bencode import bencode
|
||||||
|
|
||||||
class InvalidPath(Exception):
|
class InvalidPath(Exception):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -63,7 +63,6 @@ __all__ = ['dumps', 'loads']
|
||||||
#
|
#
|
||||||
|
|
||||||
import struct
|
import struct
|
||||||
import string
|
|
||||||
from threading import Lock
|
from threading import Lock
|
||||||
|
|
||||||
# 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()).
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
import urlparse
|
|
||||||
import time
|
import time
|
||||||
import hashlib
|
import hashlib
|
||||||
import logging
|
import logging
|
||||||
|
|
|
@ -38,7 +38,6 @@ import pygtk
|
||||||
pygtk.require('2.0')
|
pygtk.require('2.0')
|
||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
import gobject
|
|
||||||
import logging
|
import logging
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
from urlparse import urlparse
|
from urlparse import urlparse
|
||||||
|
|
|
@ -40,7 +40,6 @@ import logging
|
||||||
import os.path
|
import os.path
|
||||||
import cPickle
|
import cPickle
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
import gobject
|
|
||||||
from itertools import izip
|
from itertools import izip
|
||||||
|
|
||||||
from deluge.ui.client import client
|
from deluge.ui.client import client
|
||||||
|
|
|
@ -477,7 +477,7 @@ class TorrentView(listview.ListView, component.Component):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
return torrent_ids
|
return torrent_ids
|
||||||
except ValueError, TypeError:
|
except (ValueError, TypeError):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def get_torrent_status(self, torrent_id):
|
def get_torrent_status(self, torrent_id):
|
||||||
|
|
Loading…
Reference in New Issue