Use new style for unused variables

This commit is contained in:
Simon Schampijer 2008-04-24 16:55:19 +02:00
parent 08c1d17cb0
commit 83f76f115a
4 changed files with 10 additions and 9 deletions

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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)
##