diff --git a/src/common/caps.py b/src/common/caps.py index 20f2377d0c43d56b8603a443899c870dace7da02..358645e764161a36eebf1e9aeacbebbc6e5d321c 100644 --- a/src/common/caps.py +++ b/src/common/caps.py @@ -24,8 +24,6 @@ ## from itertools import * -import xmpp -import xmpp.features_nb import gajim import helpers diff --git a/src/common/defs.py b/src/common/defs.py index 0a217feffd3ecce5528336bff60f3523eaf1c1f3..c34b925e1ee2ad3e6b1bbdf66010f5c64b287482 100644 --- a/src/common/defs.py +++ b/src/common/defs.py @@ -23,8 +23,6 @@ ## along with Gajim. If not, see <http://www.gnu.org/licenses/>. ## -import re - docdir = '../' datadir = '../' diff --git a/src/common/xmpp/auth_nb.py b/src/common/xmpp/auth_nb.py index be262fb73f766d4f996be30268aca3e62efd7d93..672c6b82d0d7369ba5e83a5e3588a735a18a92c5 100644 --- a/src/common/xmpp/auth_nb.py +++ b/src/common/xmpp/auth_nb.py @@ -17,7 +17,6 @@ Provides library with all Non-SASL and SASL authentication mechanisms. Can be used both for client and transport authentication. ''' -import sys from protocol import * from auth import * from client import PlugIn diff --git a/src/common/xmpp/client_nb.py b/src/common/xmpp/client_nb.py index 39861240cea33a7c6f2df6ad96e1ac9bff246b21..a47f9eea2fa8b52d362bd6dcbdba29846e874369 100644 --- a/src/common/xmpp/client_nb.py +++ b/src/common/xmpp/client_nb.py @@ -23,9 +23,6 @@ examples of xmpppy structures usage. These classes can be used for simple applications "AS IS" though. ''' -import socket -import debug - import transports_nb, dispatcher_nb, auth_nb, roster_nb from client import * diff --git a/src/common/xmpp/debug.py b/src/common/xmpp/debug.py index 640f520bde280e40df0e2fcff12fe77a83c091d5..fc3458d454e7d3d39dc04ee4043c47c3d9a71916 100644 --- a/src/common/xmpp/debug.py +++ b/src/common/xmpp/debug.py @@ -41,8 +41,6 @@ import traceback import time import os -import types - if 'TERM' in os.environ: colors_enabled=True else: diff --git a/src/common/xmpp/protocol.py b/src/common/xmpp/protocol.py index c9693dc291d0600ede6f90530150f7decc73684b..1f5af01d6681da48590b0b919ade69e24fae1947 100644 --- a/src/common/xmpp/protocol.py +++ b/src/common/xmpp/protocol.py @@ -19,7 +19,7 @@ Protocol module contains tools that is needed for processing of xmpp-related data structures. """ -from simplexml import Node,NodeBuilder,ustr +from simplexml import Node, NodeBuilder import time NS_ACTIVITY ='http://jabber.org/protocol/activity' # XEP-0108 NS_ADDRESS ='http://jabber.org/protocol/address' # XEP-0033 diff --git a/src/common/xmpp/transports.py b/src/common/xmpp/transports.py index e588222afa82980c8157019527a2eb20a36b6989..86d1097cfcff16a5ae45050eb7d82732ebba46c3 100644 --- a/src/common/xmpp/transports.py +++ b/src/common/xmpp/transports.py @@ -27,11 +27,13 @@ Transports are stackable so you - f.e. TLS use HTPPROXYsocket or TCPsocket as mo Also exception 'error' is defined to allow capture of this module specific exceptions. """ -import socket,select,base64,dispatcher +import socket +import select +import base64 +import dispatcher from simplexml import ustr from client import PlugIn from protocol import * -import sys import os import errno diff --git a/src/common/xmpp/transports_nb.py b/src/common/xmpp/transports_nb.py index e886fc63879a01f9a3eaa0c253f71f3ea0580d18..aac93eeffd15f26c26b777fd81fdcc2104170f23 100644 --- a/src/common/xmpp/transports_nb.py +++ b/src/common/xmpp/transports_nb.py @@ -14,7 +14,9 @@ ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. -import socket,select,base64,dispatcher_nb +import socket +import base64 +import dispatcher_nb import struct from simplexml import ustr from client import PlugIn @@ -28,7 +30,6 @@ import errno import time import traceback -import thread import logging log = logging.getLogger('gajim.c.x.transports_nb') diff --git a/src/common/zeroconf/connection_handlers_zeroconf.py b/src/common/zeroconf/connection_handlers_zeroconf.py index 870c4c5051f29d19bf687e4e172cf6021d4beadd..16da6722e82e5ace7098a27ba4bc9fe7aaf605ec 100644 --- a/src/common/zeroconf/connection_handlers_zeroconf.py +++ b/src/common/zeroconf/connection_handlers_zeroconf.py @@ -23,7 +23,6 @@ ## along with Gajim. If not, see <http://www.gnu.org/licenses/>. ## -import os import time import socket @@ -482,4 +481,4 @@ class ConnectionHandlersZeroconf(ConnectionVcard, ConnectionBytestream, connecti def remove_transfer(self, file_props, remove_from_list = True): pass -# vim: se ts=3: \ No newline at end of file +# vim: se ts=3: diff --git a/src/common/zeroconf/zeroconf_bonjour.py b/src/common/zeroconf/zeroconf_bonjour.py index c6e281ad25b87fc009eabd52c4139b5c7b908628..fb8eba701f884d796620bc4af66a602912dc297b 100644 --- a/src/common/zeroconf/zeroconf_bonjour.py +++ b/src/common/zeroconf/zeroconf_bonjour.py @@ -18,7 +18,6 @@ ## from common import gajim -import sys import select import re from string import split @@ -335,4 +334,4 @@ class Zeroconf: return True -# vim: se ts=3: \ No newline at end of file +# vim: se ts=3: diff --git a/src/config.py b/src/config.py index b2922e5f6d6765eeea320f7b367e3e00d17f950d..50bbdbaab336c773407fbe1dc91a279504b66e99 100644 --- a/src/config.py +++ b/src/config.py @@ -57,7 +57,6 @@ from common import connection from common import passwords from common import zeroconf from common import dataforms -from common import pep from common.exceptions import GajimGeneralException diff --git a/src/features_window.py b/src/features_window.py index c430f0a91b44a3cedd61748a70cacd1d809336bb..0665f4d63455d734c027327192d8d8d541ca1cd5 100644 --- a/src/features_window.py +++ b/src/features_window.py @@ -28,8 +28,6 @@ import sys import gtk import gtkgui_helpers -import dialogs - from common import gajim from common import helpers @@ -187,7 +185,6 @@ class FeaturesWindow: def gpg_available(self): if os.name == 'nt': return False - from common import gajim return gajim.HAVE_GPG def network_manager_available(self): @@ -311,7 +308,6 @@ class FeaturesWindow: return False def pycrypto_available(self): - from common import gajim return gajim.HAVE_PYCRYPTO def docutils_available(self): @@ -322,7 +318,6 @@ class FeaturesWindow: return True def pysexy_available(self): - from common import gajim return gajim.HAVE_PYSEXY # vim: se ts=3: diff --git a/src/gajim-remote.py b/src/gajim-remote.py index 378aa5abe5a9c4ca2d33b6bcb2cfcfd48413e1b0..413a9f27ae2127cf8b2e44de2d0c4e8d8bfe3d91 100755 --- a/src/gajim-remote.py +++ b/src/gajim-remote.py @@ -33,7 +33,7 @@ import signal signal.signal(signal.SIGINT, signal.SIG_DFL) # ^C exits the application from common import exceptions -from common import i18n +from common import i18n # This installs _() function try: PREFERRED_ENCODING = locale.getpreferredencoding() diff --git a/src/gajim.py b/src/gajim.py index 1b9d396b6cf2561c70a65f659d95c233a46ec034..3b9f002601389e9d5ffc51e1acbaf36c697e547d 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -3168,7 +3168,8 @@ class Interface: gajim.default_session_type = ChatControlSession self.register_handlers() if gajim.config.get('enable_zeroconf'): - gajim.connections[gajim.ZEROCONF_ACC_NAME] = common.zeroconf.connection_zeroconf.ConnectionZeroconf(gajim.ZEROCONF_ACC_NAME) + gajim.connections[gajim.ZEROCONF_ACC_NAME] = \ + connection_zeroconf.ConnectionZeroconf(gajim.ZEROCONF_ACC_NAME) for account in gajim.config.get_per('accounts'): if not gajim.config.get_per('accounts', account, 'is_zeroconf'): gajim.connections[account] = common.connection.Connection(account) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index d0fabd784358152a46604992349b7d9b29fab850..db8353c208cc0cbbbe8511492d45fa6f5aea1cf6 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -45,7 +45,6 @@ from common import helpers from chat_control import ChatControl from chat_control import ChatControlBase -from conversation_textview import ConversationTextview from common.exceptions import GajimGeneralException #(status_image, type, nick, shown_nick) diff --git a/src/groups.py b/src/groups.py index a827ed28813753de1102354ec37f1eeb3c184dbc..604c73efb8c213a740809b8b631edc1111f3cbeb 100644 --- a/src/groups.py +++ b/src/groups.py @@ -21,8 +21,6 @@ '''Window to create new post for discussion groups service.''' -import gtk - from common import gajim, xmpp import gtkgui_helpers diff --git a/src/gtkexcepthook.py b/src/gtkexcepthook.py index 114cfaf9ea21e3b2c7b015495ca6e09348361eac..4719f520de3564acc46d5cf53c4c9176a693eaad 100644 --- a/src/gtkexcepthook.py +++ b/src/gtkexcepthook.py @@ -27,7 +27,7 @@ import threading import gtk import pango -from common import i18n +from common import i18n # installs _() function import dialogs from cStringIO import StringIO diff --git a/src/ipython_view.py b/src/ipython_view.py index 08b19cda9edc589c347d505ca25e69454e5c76be..a58efcfef5cefaa1e70416a1967fed506fc50ada 100644 --- a/src/ipython_view.py +++ b/src/ipython_view.py @@ -48,7 +48,6 @@ import sys import os import pango from StringIO import StringIO -import thread try: import IPython diff --git a/src/negotiation.py b/src/negotiation.py index 5e7f15dede74d9e546f297ba0e02d15c475ba235..bd5a32123ab31023a1daf7d4f9513bd296265a7b 100644 --- a/src/negotiation.py +++ b/src/negotiation.py @@ -22,8 +22,6 @@ import gtkgui_helpers import dataforms_widget -import dialogs - from common import dataforms from common import gajim from common import xmpp diff --git a/src/osx/growl/Growl.py b/src/osx/growl/Growl.py index b9ed533ba2b1d8bdf6ba49039579685eafa45dca..f035e69dfc9aa98efdd59b38f90180a43af12136 100644 --- a/src/osx/growl/Growl.py +++ b/src/osx/growl/Growl.py @@ -14,7 +14,6 @@ try: import _growl except Exception: _growl = False -import types import struct import md5 import socket @@ -243,4 +242,4 @@ class GrowlNotifier(object): def notifyCB(self, userdata): print "Got notify in pyland", userdata -# vim: se ts=3: \ No newline at end of file +# vim: se ts=3: diff --git a/src/osx/growler.py b/src/osx/growler.py index 62573d5a3808c391a2a4e6e9695a2453012bbaf1..0a1dceb1a9e1b9fe11a71fd09ae37624b69b6ba6 100644 --- a/src/osx/growler.py +++ b/src/osx/growler.py @@ -1,6 +1,6 @@ import sys, os from growl.Growl import GrowlNotifier -from common import gajim, helpers +from common import gajim if sys.platform != "darwin": @@ -62,4 +62,4 @@ def filterString(string): return string -# vim: se ts=3: \ No newline at end of file +# vim: se ts=3: diff --git a/src/profile_window.py b/src/profile_window.py index 710deac5b326c87ef28f1af297321c03438def40..f90cc5edbbe5af2fc0a67c3de40e63f1c22e5772 100644 --- a/src/profile_window.py +++ b/src/profile_window.py @@ -33,7 +33,6 @@ import dialogs import vcard from common import gajim -from common.i18n import Q_ class ProfileWindow: diff --git a/src/roster_window.py b/src/roster_window.py index 26c6477bda390b9b6e7a51cdfc232fd35ea8cb56..2d099a6178bc7b273199ae919011dbb4384ad553 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -61,8 +61,6 @@ from common import pep from message_window import MessageWindowMgr -from session import ChatControlSession - from common import dbus_support if dbus_support.supported: from music_track_listener import MusicTrackListener