[thorstenp] fix reimported modules

This commit is contained in:
Yann Leboulanger 2008-12-03 21:23:04 +00:00
parent 22f2cb37a7
commit 088378a9b7
4 changed files with 11 additions and 19 deletions

View File

@ -36,7 +36,6 @@ import subprocess
import urllib
import errno
import select
import sha
import base64
import sys
from encodings.punycode import punycode_encode
@ -732,7 +731,7 @@ def get_jid_from_iq(iq_obj):
def get_auth_sha(sid, initiator, target):
''' return sha of sid + initiator + target used for proxy auth'''
return sha.new("%s%s%s" % (sid, initiator, target)).hexdigest()
return hash_sha1("%s%s%s" % (sid, initiator, target)).hexdigest()
distro_info = {

View File

@ -37,9 +37,9 @@
##
import os
import warnings
if os.name == 'nt':
import warnings
warnings.filterwarnings(action='ignore')
if os.path.isdir('gtk'):
@ -56,6 +56,11 @@ if os.name == 'nt':
os.environ['GTK_BASEPATH'] = 'gtk'
import sys
if sys.platform == 'darwin':
try:
import osx
except ImportError:
pass
if os.name == 'nt':
# needed for docutils
@ -151,7 +156,6 @@ common.configpaths.gajimpaths.init_profile(profile)
del profile
# PyGTK2.10+ only throws a warning
import warnings
warnings.filterwarnings('error', module='gtk')
try:
import gtk
@ -162,7 +166,6 @@ except Warning, msg:
warnings.resetwarnings()
if os.name == 'nt':
import warnings
warnings.filterwarnings(action='ignore')
pritext = ''
@ -408,9 +411,8 @@ def on_exit():
gajim.interface.save_config()
if sys.platform == 'darwin':
try:
import osx
osx.shutdown()
except ImportError:
except Exception:
pass
import atexit
@ -3366,9 +3368,8 @@ if __name__ == '__main__':
if sys.platform == 'darwin':
try:
import osx
osx.init()
except ImportError:
except Exception:
pass
Interface()

View File

@ -1003,7 +1003,6 @@ change_cursor = None
if __name__ == '__main__':
import os
from common import gajim
class log(object):

View File

@ -1726,7 +1726,6 @@ class RosterWindow:
def music_track_changed(self, unused_listener, music_track_info,
account=''):
from common import pep
if account == '':
accounts = gajim.connections.keys()
if music_track_info is None:
@ -2033,13 +2032,8 @@ class RosterWindow:
del gajim.interface.status_sent_to_users[account][contact.jid]
# Delete pep if needed
#FIXME: py2.5only
# keep_pep = any(c.show not in ('error', 'offline') for c in
# contact_instances)
keep_pep = False
for c in contact_instances:
if c.show not in ('error', 'offline'):
keep_pep = True
keep_pep = any(c.show not in ('error', 'offline') for c in
contact_instances)
if not keep_pep and contact.jid != gajim.get_jid_from_account(account) \
and not contact.is_groupchat():
pep.delete_pep(contact.jid, account)
@ -3288,7 +3282,6 @@ class RosterWindow:
if gajim.connections[account].pep_supported:
# As many implementations don't support retracting items, we send a
# "Stopped" event first
from common import pep
pep.user_send_tune(account, '')
pep.user_retract_tune(account)
helpers.update_optional_features(account)