From e9f20cfe0fe1d1e26d86b6b3ead1e88fd69b39a1 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 20 Jun 2006 09:39:36 -0400 Subject: [PATCH] pylint fixes --- sugar/bots.py | 2 -- sugar/browser/BrowserActivity.py | 1 - sugar/chat/ChatWindow.py | 4 ++-- sugar/chat/GroupChat.py | 1 - sugar/p2p/Notifier.py | 1 - sugar/p2p/model/LocalModel.py | 1 - sugar/presence/PresenceService.py | 3 --- sugar/presence/Service.py | 1 - sugar/session/LogWriter.py | 1 - sugar/shell/PresenceWindow.py | 2 +- sugar/shell/StartPage.py | 4 +--- 11 files changed, 4 insertions(+), 17 deletions(-) diff --git a/sugar/bots.py b/sugar/bots.py index 614a1636..edc189d7 100644 --- a/sugar/bots.py +++ b/sugar/bots.py @@ -1,8 +1,6 @@ -import os import random import base64 -from sugar import env from sugar.presence import Service from sugar.presence import Buddy from sugar.presence import PresenceService diff --git a/sugar/browser/BrowserActivity.py b/sugar/browser/BrowserActivity.py index 594abab2..d2eeb416 100644 --- a/sugar/browser/BrowserActivity.py +++ b/sugar/browser/BrowserActivity.py @@ -1,7 +1,6 @@ import logging import xml.sax.saxutils -import dbus import pygtk pygtk.require('2.0') import gtk diff --git a/sugar/chat/ChatWindow.py b/sugar/chat/ChatWindow.py index c7b100b5..59cb02c7 100644 --- a/sugar/chat/ChatWindow.py +++ b/sugar/chat/ChatWindow.py @@ -22,7 +22,7 @@ class ChatWindow(gtk.Window): if event.keyval == gtk.keysyms.s and \ event.state & gtk.gdk.CONTROL_MASK: if self._chat.get_mode() == Chat.SKETCH_MODE: - self._chat.set_mode(Chat.TEXT_MODE) + self._chat.set_mode(Chat.TEXT_MODE) elif self._chat.get_mode() == Chat.TEXT_MODE: - self._chat.set_mode(Chat.SKETCH_MODE) + self._chat.set_mode(Chat.SKETCH_MODE) diff --git a/sugar/chat/GroupChat.py b/sugar/chat/GroupChat.py index ea2c4a7f..8f32ace5 100644 --- a/sugar/chat/GroupChat.py +++ b/sugar/chat/GroupChat.py @@ -1,7 +1,6 @@ import logging from sugar.chat.Chat import Chat -from sugar.presence.Service import Service from sugar.p2p.Stream import Stream from sugar.presence.PresenceService import PresenceService diff --git a/sugar/p2p/Notifier.py b/sugar/p2p/Notifier.py index 2672f288..d6abc5b1 100644 --- a/sugar/p2p/Notifier.py +++ b/sugar/p2p/Notifier.py @@ -1,5 +1,4 @@ from sugar.p2p import network -from sugar.presence.Service import Service class Notifier: def __init__(self, service): diff --git a/sugar/p2p/model/LocalModel.py b/sugar/p2p/model/LocalModel.py index 18a7529d..f293ef3f 100644 --- a/sugar/p2p/model/LocalModel.py +++ b/sugar/p2p/model/LocalModel.py @@ -1,7 +1,6 @@ import socket import logging -from sugar.presence.Service import Service from sugar.p2p.Notifier import Notifier from sugar.p2p.model.AbstractModel import AbstractModel from sugar.p2p import network diff --git a/sugar/presence/PresenceService.py b/sugar/presence/PresenceService.py index a294f60b..c42e52e9 100644 --- a/sugar/presence/PresenceService.py +++ b/sugar/presence/PresenceService.py @@ -2,11 +2,8 @@ import threading import avahi, dbus, dbus.glib, dbus.dbus_bindings, gobject import Buddy import Service -import os -import string import random import logging -from sugar import util from sugar import env def _get_local_ip_address(ifname): diff --git a/sugar/presence/Service.py b/sugar/presence/Service.py index 464523ab..48cc9309 100644 --- a/sugar/presence/Service.py +++ b/sugar/presence/Service.py @@ -1,6 +1,5 @@ import avahi from sugar import util -import string import dbus def _txt_to_dict(txt): diff --git a/sugar/session/LogWriter.py b/sugar/session/LogWriter.py index 1368e5d1..a04d14b6 100644 --- a/sugar/session/LogWriter.py +++ b/sugar/session/LogWriter.py @@ -1,4 +1,3 @@ -import os import sys import logging diff --git a/sugar/shell/PresenceWindow.py b/sugar/shell/PresenceWindow.py index a216073b..c9ec5585 100644 --- a/sugar/shell/PresenceWindow.py +++ b/sugar/shell/PresenceWindow.py @@ -107,7 +107,7 @@ class PresenceWindow(gtk.Window): def _on_buddyList_buddy_double_clicked(self, view, *args): """ Select the chat for this buddy or group """ - (model, aniter) = widget.get_selection().get_selected() + (model, aniter) = view.get_selection().get_selected() chat = None buddy = view.get_model().get_value(aniter, self._MODEL_COL_BUDDY) if buddy and not self._chats.has_key(buddy): diff --git a/sugar/shell/StartPage.py b/sugar/shell/StartPage.py index 8f5023fc..323401ef 100644 --- a/sugar/shell/StartPage.py +++ b/sugar/shell/StartPage.py @@ -5,12 +5,10 @@ import pango import dbus import cgi import xml.sax.saxutils -import re import gobject import google from sugar.presence.PresenceService import PresenceService -from sugar.presence import Service from sugar.browser import BrowserActivity _COLUMN_TITLE = 0 @@ -173,7 +171,7 @@ class StartPage(gtk.HBox): self._pservice.start() self._pservice.track_service_type(BrowserActivity._BROWSER_ACTIVITY_TYPE) if self._pservice.get_owner(): - self._on_buddy_appeared_cb(pservice, self._pservice.get_owner()) + self._on_buddy_appeared_cb(self._pservice, self._pservice.get_owner()) vbox = gtk.VBox()