Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2008-04-24 14:55:19 (GMT)
committer Simon Schampijer <simon@schampijer.de>2008-04-24 14:55:19 (GMT)
commit83f76f115a89b9430f00c93d7a11b2d61e1001b1 (patch)
treec69e727d636fddf0d3796c55fe6b1c25b82f53be /sugar
parent08c1d17cb014a6baf23fd526c93d45dada4fad08 (diff)
Use new style for unused variables
Diffstat (limited to 'sugar')
-rw-r--r--sugar/activity/activityfactory.py2
-rw-r--r--sugar/graphics/palette.py5
-rw-r--r--sugar/graphics/toolbox.py2
-rw-r--r--sugar/network.py10
4 files changed, 10 insertions, 9 deletions
diff --git a/sugar/activity/activityfactory.py b/sugar/activity/activityfactory.py
index 7bf36c4..42b8c40 100644
--- a/sugar/activity/activityfactory.py
+++ b/sugar/activity/activityfactory.py
@@ -58,7 +58,7 @@ _children_pid = []
def _sigchild_handler(signum, frame):
for child_pid in _children_pid:
- pid = os.waitpid(child_pid, os.WNOHANG)[0]
+ pid, status_ = os.waitpid(child_pid, os.WNOHANG)
if pid > 0:
_children_pid.remove(pid)
diff --git a/sugar/graphics/palette.py b/sugar/graphics/palette.py
index e2dfd21..19a7249 100644
--- a/sugar/graphics/palette.py
+++ b/sugar/graphics/palette.py
@@ -98,7 +98,8 @@ class MouseSpeedDetector(gobject.GObject):
def _get_mouse_position(self):
display = gtk.gdk.display_get_default()
- return display.get_pointer()[1:3]
+ screen_, x, y, mask_ = display.get_pointer()
+ return (x, y)
def _detect_motion(self):
oldx, oldy = self._mouse_pos
@@ -737,7 +738,7 @@ class Invoker(gobject.GObject):
if self._cursor_x == -1 or self._cursor_y == -1:
display = gtk.gdk.display_get_default()
- x, y = display.get_pointer()[1:3]
+ screen_, x, y, mask_ = display.get_pointer()
self._cursor_x = x
self._cursor_y = y
diff --git a/sugar/graphics/toolbox.py b/sugar/graphics/toolbox.py
index 4897add..f0889be 100644
--- a/sugar/graphics/toolbox.py
+++ b/sugar/graphics/toolbox.py
@@ -59,7 +59,7 @@ class Toolbox(gtk.VBox):
def add_toolbar(self, name, toolbar):
label = gtk.Label(name)
- width = label.size_request()[0]
+ width, height_ = label.size_request()
label.set_size_request(max(width, style.TOOLBOX_TAB_LABEL_WIDTH), -1)
label.set_alignment(0.0, 0.5)
diff --git a/sugar/network.py b/sugar/network.py
index db8a562..6632761 100644
--- a/sugar/network.py
+++ b/sugar/network.py
@@ -222,10 +222,10 @@ class GlibURLDownloader(gobject.GObject):
else:
fname = self._get_filename_from_headers(self._info.headers)
self._suggested_fname = fname
- path = urllib.splittype(self._url)[1]
- path = urllib.splithost(path or "")[1]
- path = urllib.splitquery(path or "")[0]
- path = urllib.splitattr(path or "")[0]
+ garbage_, path = urllib.splittype(self._url)
+ garbage_, path = urllib.splithost(path or "")
+ path, garbage_ = urllib.splitquery(path or "")
+ path, garbage_ = urllib.splitattr(path or "")
suffix = os.path.splitext(path)[1]
(self._outf, self._fname) = tempfile.mkstemp(suffix=suffix,
dir=self._destdir)
@@ -399,7 +399,7 @@ class GlibXMLRPCTransport(xmlrpclib.Transport):
def make_connection(self, host):
"""Use our own connection object so we can get its socket."""
# create a HTTP connection object from a host descriptor
- host = self.get_host_info(host)[0]
+ host, extra_headers_, x509_ = self.get_host_info(host)
return GlibHTTP(host)
##