Fixed some flake8 F841

This commit is contained in:
Odd Stråbø 2019-10-04 02:36:48 +02:00
parent d28c9a3ac8
commit 4d6b32d988
6 changed files with 9 additions and 20 deletions

View file

@ -47,7 +47,6 @@ class ContextMenu(xbmcgui.WindowXMLDialog):
if window('JellyfinUserImage'):
self.getControl(USER_IMAGE).setImage(window('JellyfinUserImage'))
height = 479 + (len(self._options) * 55)
LOG.info("options: %s", self._options)
self.list_ = self.getControl(LIST)

View file

@ -117,7 +117,6 @@ class LoginManual(xbmcgui.WindowXMLDialog):
def _login(self, username, password):
mode = self.connect_manager.get_server_info(self.connect_manager.server_id)['LastConnectionMode']
server_data = self.connect_manager.get_server_info(self.connect_manager.server_id)
server = self.connect_manager.get_server_address(server_data, server_data['LastConnectionMode'])
result = self.connect_manager.login(server, username, password)

View file

@ -51,8 +51,7 @@ class Movies(KodiDb):
obj['MovieId'] = e_item[0]
obj['FileId'] = e_item[1]
obj['PathId'] = e_item[2]
except TypeError as error:
except TypeError:
update = False
LOG.debug("MovieId %s not found", obj['Id'])
obj['MovieId'] = self.create_entry()
@ -209,8 +208,7 @@ class Movies(KodiDb):
try:
obj['SetId'] = e_item[0]
self.update_boxset(*values(obj, QU.update_set_obj))
except TypeError as error:
except TypeError:
LOG.debug("SetId %s not found", obj['Id'])
obj['SetId'] = self.add_boxset(*values(obj, QU.add_set_obj))

View file

@ -48,8 +48,7 @@ class Music(KodiDb):
try:
obj['ArtistId'] = e_item[0]
except TypeError as error:
except TypeError:
update = False
obj['ArtistId'] = None
LOG.debug("ArtistId %s not found", obj['Id'])
@ -116,8 +115,7 @@ class Music(KodiDb):
try:
obj['AlbumId'] = e_item[0]
except TypeError as error:
except TypeError:
update = False
obj['AlbumId'] = None
LOG.debug("AlbumId %s not found", obj['Id'])
@ -226,8 +224,7 @@ class Music(KodiDb):
obj['SongId'] = e_item[0]
obj['PathId'] = e_item[2]
obj['AlbumId'] = e_item[3]
except TypeError as error:
except TypeError:
update = False
obj['SongId'] = self.create_entry_song()
LOG.debug("SongId %s not found", obj['Id'])

View file

@ -55,8 +55,7 @@ class MusicVideos(KodiDb):
obj['MvideoId'] = e_item[0]
obj['FileId'] = e_item[1]
obj['PathId'] = e_item[2]
except TypeError as error:
except TypeError:
update = False
LOG.debug("MvideoId for %s not found", obj['Id'])
obj['MvideoId'] = self.create_entry()

View file

@ -64,8 +64,7 @@ class TVShows(KodiDb):
try:
obj['ShowId'] = e_item[0]
obj['PathId'] = e_item[2]
except TypeError as error:
except TypeError:
update = False
LOG.debug("ShowId %s not found", obj['Id'])
obj['ShowId'] = self.create_entry()
@ -269,8 +268,7 @@ class TVShows(KodiDb):
obj['EpisodeId'] = e_item[0]
obj['FileId'] = e_item[1]
obj['PathId'] = e_item[2]
except TypeError as error:
except TypeError:
update = False
LOG.debug("EpisodeId %s not found", obj['Id'])
obj['EpisodeId'] = self.create_entry_episode()
@ -361,8 +359,7 @@ class TVShows(KodiDb):
try:
self.add_episode(*values(obj, QU.add_episode_obj))
except sqlite3.IntegrityError as error:
except sqlite3.IntegrityError:
LOG.error("IntegrityError for %s", obj)
obj['EpisodeId'] = self.create_entry_episode()