Fix linter errors

This commit is contained in:
Sumner Evans
2020-05-31 22:35:35 -06:00
parent 10c5d6edb1
commit 8ca83278ae
2 changed files with 3 additions and 4 deletions

View File

@@ -266,12 +266,9 @@ class AdapterManager:
job.cancel()
AdapterManager.executor.shutdown()
print("2")
AdapterManager.download_executor.shutdown()
print("3")
if AdapterManager._instance:
AdapterManager._instance.shutdown()
print("4")
logging.info("AdapterManager shutdown complete")

View File

@@ -791,12 +791,13 @@ class SublimeMusicApp(Gtk.Application):
)
# If already playing, then make the player itself seek.
if self.player.song_loaded:
if self.player and self.player.song_loaded:
self.player.seek(new_time)
self.save_play_queue()
def on_device_update(self, win: Any, device_uuid: str):
assert self.player
if device_uuid == self.app_config.state.current_device:
return
self.app_config.state.current_device = device_uuid
@@ -997,6 +998,7 @@ class SublimeMusicApp(Gtk.Application):
# in the callback.
@dbus_propagate(self)
def do_play_song(order_token: int, song: Song):
assert self.player
if order_token != self.song_playing_order_token:
return