running pychecker in some files and fixing cleaning up those errors/info that REALLY matter

This commit is contained in:
Nikos Kouremenos 2005-11-18 13:12:16 +00:00
parent 97d1166be8
commit 965e9cb8c7
3 changed files with 3 additions and 10 deletions

View File

@ -18,7 +18,6 @@
## ##
from os import tmpfile from os import tmpfile
import locale
from common import helpers from common import helpers
USE_GPG = True USE_GPG = True
@ -167,7 +166,7 @@ else:
opt = '--list-secret-keys' opt = '--list-secret-keys'
else: else:
opt = '--list-keys' opt = '--list-keys'
proc = self.run(['--with-colons', opt], \ proc = self.run(['--with-colons', opt],
create_fhs=['stdout']) create_fhs=['stdout'])
output = proc.handles['stdout'].read() output = proc.handles['stdout'].read()
proc.handles['stdout'].close() proc.handles['stdout'].close()

View File

@ -1323,7 +1323,7 @@ class Connection:
for conf in confs: for conf in confs:
autojoin_val = conf.getAttr('autojoin') autojoin_val = conf.getAttr('autojoin')
if autojoin_val is None: # not there (it's optional) if autojoin_val is None: # not there (it's optional)
autojoin_val == False autojoin_val = False
bm = { 'name': conf.getAttr('name'), bm = { 'name': conf.getAttr('name'),
'jid': conf.getAttr('jid'), 'jid': conf.getAttr('jid'),
'autojoin': autojoin_val, 'autojoin': autojoin_val,

View File

@ -20,7 +20,6 @@
import gtk import gtk
import gtk.glade import gtk.glade
import pango
import gobject import gobject
import os import os
import time import time
@ -93,7 +92,6 @@ class RosterWindow:
model = self.tree.get_model() model = self.tree.get_model()
acct = self.get_account_iter(account) acct = self.get_account_iter(account)
found = [] found = []
fin = False
if model is None: # when closing Gajim model can be none (async pbs?) if model is None: # when closing Gajim model can be none (async pbs?)
return found return found
group_iter = model.iter_children(acct) group_iter = model.iter_children(acct)
@ -675,7 +673,6 @@ class RosterWindow:
def chg_contact_status(self, contact, show, status, account): def chg_contact_status(self, contact, show, status, account):
'''When a contact changes his or her status''' '''When a contact changes his or her status'''
showOffline = gajim.config.get('showoffline') showOffline = gajim.config.get('showoffline')
model = self.tree.get_model()
contact_instances = gajim.contacts[account][contact.jid] contact_instances = gajim.contacts[account][contact.jid]
contact.show = show contact.show = show
contact.status = status contact.status = status
@ -1107,7 +1104,7 @@ class RosterWindow:
status_menuitem = childs[0] status_menuitem = childs[0]
# we skip the seperator # we skip the seperator
advanced_actions_menuitem = childs[2] # skip advanced_actions_menuitem, childs[2]
xml_console_menuitem = xml.get_widget('xml_console_menuitem') xml_console_menuitem = xml.get_widget('xml_console_menuitem')
set_motd_menuitem = xml.get_widget('set_motd_menuitem') set_motd_menuitem = xml.get_widget('set_motd_menuitem')
update_motd_menuitem = xml.get_widget('update_motd_menuitem') update_motd_menuitem = xml.get_widget('update_motd_menuitem')
@ -1416,7 +1413,6 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
if gajim.connections[account].connected < 2: if gajim.connections[account].connected < 2:
self.set_connecting_state(account) self.set_connecting_state(account)
save_pass = gajim.config.get_per('accounts', account, 'savepass')
if gajim.connections[account].connected < 2 and \ if gajim.connections[account].connected < 2 and \
not gajim.connections[account].password: not gajim.connections[account].password:
passphrase = '' passphrase = ''
@ -1496,7 +1492,6 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
return message return message
def connected_rooms(self, account): def connected_rooms(self, account):
accounts = gajim.connections.keys()
if True in gajim.gc_connected[account].values(): if True in gajim.gc_connected[account].values():
return True return True
return False return False
@ -1684,7 +1679,6 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
path = None path = None
autopopup = gajim.config.get('autopopup') autopopup = gajim.config.get('autopopup')
autopopupaway = gajim.config.get('autopopupaway') autopopupaway = gajim.config.get('autopopupaway')
save_in_queue = False
# Do we have a queue? # Do we have a queue?
qs = gajim.awaiting_events[account] qs = gajim.awaiting_events[account]