From 9f71aa864fd6753817cc7a6461d2ff08ec9a34a0 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Sun, 5 May 2013 01:26:28 +0200 Subject: [PATCH] Remove various unused bits --- src/sugar3/activity/htmlactivity.py | 1 - src/sugar3/dispatch/saferef.py | 2 +- src/sugar3/graphics/colorbutton.py | 1 - src/sugar3/graphics/radiotoolbutton.py | 1 - src/sugar3/graphics/toggletoolbutton.py | 1 - src/sugar3/graphics/toolbutton.py | 1 - tests/test_uitree.py | 1 - 7 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/sugar3/activity/htmlactivity.py b/src/sugar3/activity/htmlactivity.py index ac6acc74..38beed55 100644 --- a/src/sugar3/activity/htmlactivity.py +++ b/src/sugar3/activity/htmlactivity.py @@ -18,7 +18,6 @@ import json import os -from gi.repository import Gtk from gi.repository import GConf from gi.repository import WebKit2 from gwebsockets.server import Server diff --git a/src/sugar3/dispatch/saferef.py b/src/sugar3/dispatch/saferef.py index 8bcfd8a1..3be5a3f7 100644 --- a/src/sugar3/dispatch/saferef.py +++ b/src/sugar3/dispatch/saferef.py @@ -121,7 +121,7 @@ class BoundMethodWeakref(object): except Exception, e: try: traceback.print_exc() - except AttributeError, err: + except AttributeError: print '''Exception during saferef %s cleanup function %s: %s'''%( self, function, e ) diff --git a/src/sugar3/graphics/colorbutton.py b/src/sugar3/graphics/colorbutton.py index 1d2faf8d..409e9855 100644 --- a/src/sugar3/graphics/colorbutton.py +++ b/src/sugar3/graphics/colorbutton.py @@ -545,7 +545,6 @@ class ColorToolButton(Gtk.ToolItem): title = GObject.property(type=str, getter=get_title, setter=set_title) def do_draw(self, cr): - child = self.get_child() if self._palette and self._palette.is_up(): allocation = self.get_allocation() # draw a black background, has been done by the engine before diff --git a/src/sugar3/graphics/radiotoolbutton.py b/src/sugar3/graphics/radiotoolbutton.py index a51a39a6..09b26ad1 100644 --- a/src/sugar3/graphics/radiotoolbutton.py +++ b/src/sugar3/graphics/radiotoolbutton.py @@ -131,7 +131,6 @@ class RadioToolButton(Gtk.RadioToolButton): type=object, setter=set_palette_invoker, getter=get_palette_invoker) def do_draw(self, cr): - child = self.get_child() if self.palette and self.palette.is_up(): allocation = self.get_allocation() # draw a black background, has been done by the engine before diff --git a/src/sugar3/graphics/toggletoolbutton.py b/src/sugar3/graphics/toggletoolbutton.py index 0c4e5920..6d3c7bd4 100644 --- a/src/sugar3/graphics/toggletoolbutton.py +++ b/src/sugar3/graphics/toggletoolbutton.py @@ -125,7 +125,6 @@ class ToggleToolButton(Gtk.ToggleToolButton): getter=get_accelerator) def do_draw(self, cr): - child = self.get_child() if self.palette and self.palette.is_up(): allocation = self.get_allocation() # draw a black background, has been done by the engine before diff --git a/src/sugar3/graphics/toolbutton.py b/src/sugar3/graphics/toolbutton.py index 522d6538..4a9feeeb 100644 --- a/src/sugar3/graphics/toolbutton.py +++ b/src/sugar3/graphics/toolbutton.py @@ -163,7 +163,6 @@ class ToolButton(Gtk.ToolButton): type=object, setter=set_palette_invoker, getter=get_palette_invoker) def do_draw(self, cr): - child = self.get_child() if self.palette and self.palette.is_up(): allocation = self.get_allocation() # draw a black background, has been done by the engine before diff --git a/tests/test_uitree.py b/tests/test_uitree.py index d640e10d..1104a433 100644 --- a/tests/test_uitree.py +++ b/tests/test_uitree.py @@ -35,7 +35,6 @@ class TestUITree(unittest.TestCase): def show_window1(): from gi.repository import Gtk - from gi.repository import GLib window = Gtk.Window() window.set_title("window1")