Fix flake8-3 complaints

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2019-06-05 15:00:57 +10:00 committed by Benjamin Tissoires
parent 9a97f19a13
commit 4b02a6f51c
3 changed files with 6 additions and 8 deletions

View File

@ -348,10 +348,10 @@ class Tuhi(GObject.Object):
# create the device if unknown from us # create the device if unknown from us
if bluez_device.address not in self.devices: if bluez_device.address not in self.devices:
d = TuhiDevice(bluez_device, self.config, uuid, mode) d = TuhiDevice(bluez_device, self.config, uuid, mode)
d.dbus_device = self.server.create_device(d) d.dbus_device = self.server.create_device(d)
d.connect('notify::listening', self._on_listening_updated) d.connect('notify::listening', self._on_listening_updated)
self.devices[bluez_device.address] = d self.devices[bluez_device.address] = d
d = self.devices[bluez_device.address] d = self.devices[bluez_device.address]
@ -399,5 +399,3 @@ def main(args=sys.argv):
Tuhi().run() Tuhi().run()
except KeyboardInterrupt: except KeyboardInterrupt:
pass pass
finally:
pass

View File

@ -229,7 +229,7 @@ class BlueZDevice(GObject.Object):
result.code == Gio.IOErrorEnum.DBUS_ERROR and result.code == Gio.IOErrorEnum.DBUS_ERROR and
Gio.dbus_error_get_remote_error(result) == 'org.bluez.Error.Failed' and Gio.dbus_error_get_remote_error(result) == 'org.bluez.Error.Failed' and
'Operation already in progress' in result.message): 'Operation already in progress' in result.message):
logger.debug(f'{self.address}: Already connecting') logger.debug(f'{self.address}: Already connecting')
elif isinstance(result, Exception): elif isinstance(result, Exception):
logger.error(f'Connection failed: {result}') logger.error(f'Connection failed: {result}')