Remove unused variables (see #103)
This commit is contained in:
parent
420946d7d4
commit
bcfd17a8ae
5 changed files with 8 additions and 9 deletions
|
@ -298,7 +298,7 @@ class Client(Base):
|
|||
resources = socket.getaddrinfo(host, port, socket.AF_UNSPEC,
|
||||
socket.SOCK_STREAM, socket.IPPROTO_TCP)
|
||||
for res in resources:
|
||||
af, socktype, proto, canonname, sa = res
|
||||
af, socktype, proto, _, sa = res
|
||||
try:
|
||||
sock = socket.socket(af, socktype, proto)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
||||
|
@ -754,7 +754,6 @@ class Client(Base):
|
|||
data = None
|
||||
size = 1
|
||||
offset = 0
|
||||
index = 0
|
||||
|
||||
# Read data until size is reached
|
||||
while offset < size:
|
||||
|
@ -775,7 +774,7 @@ class Client(Base):
|
|||
self._logger.debug("size: %d", size)
|
||||
# For some commands the second line is the mimetype
|
||||
if has_mimetype:
|
||||
mimetype = self._parse_dict([self._read_line()])['type']
|
||||
self._parse_dict([self._read_line()])['type']
|
||||
# Next line is the count of bytes read
|
||||
binary = int(self._parse_dict([self._read_line()])['binary'])
|
||||
self._logger.debug("binary: %d", binary)
|
||||
|
@ -1148,7 +1147,7 @@ class MCGTrack:
|
|||
if date_string:
|
||||
try:
|
||||
self._last_modified = dateutil.parser.isoparse(date_string)
|
||||
except ValueError as e:
|
||||
except ValueError:
|
||||
self._logger.debug("Invalid date format: %s", date_string)
|
||||
|
||||
def get_last_modified(self):
|
||||
|
|
|
@ -152,7 +152,7 @@ class CoverPanel(Gtk.Overlay):
|
|||
# Load image and draw it
|
||||
try:
|
||||
self._cover_pixbuf = Utils.load_pixbuf(data)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
self._logger.exception("Failed to set albumart")
|
||||
self._cover_pixbuf = None
|
||||
else:
|
||||
|
|
|
@ -297,7 +297,7 @@ class LibraryPanel(Adw.Bin):
|
|||
# Load image and draw it
|
||||
try:
|
||||
self._standalone_pixbuf = Utils.load_pixbuf(data)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
self._logger.exception("Failed to set albumart")
|
||||
self._standalone_pixbuf = self._get_default_image()
|
||||
else:
|
||||
|
|
|
@ -175,7 +175,7 @@ class PlaylistPanel(Adw.Bin):
|
|||
# Load image and draw it
|
||||
try:
|
||||
self._standalone_pixbuf = Utils.load_pixbuf(data)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
self._logger.exception("Failed to set albumart")
|
||||
self._cover_pixbuf = self._get_default_image()
|
||||
else:
|
||||
|
|
|
@ -103,8 +103,8 @@ class ServerPanel(Adw.Bin):
|
|||
button = Gtk.CheckButton.new_with_label(device.get_name())
|
||||
if device.is_enabled():
|
||||
button.set_active(True)
|
||||
handler = button.connect('toggled',
|
||||
self.on_output_device_toggled, device)
|
||||
button.connect('toggled', self.on_output_device_toggled,
|
||||
device)
|
||||
self.output_devices.insert(button, -1)
|
||||
self._output_buttons[device.get_id()] = button
|
||||
|
||||
|
|
Loading…
Reference in a new issue