Removed else statements from loops without breaks

This commit is contained in:
Abby Gourlay 2020-08-02 15:53:58 +01:00
parent 98c86304fe
commit cc899931ed
4 changed files with 12 additions and 11 deletions

View file

@ -260,7 +260,7 @@ class ConnectionManager(object):
} }
servers.append(info) servers.append(info)
else:
return servers return servers
# TODO: Make IPv6 compatable # TODO: Make IPv6 compatable

View file

@ -111,7 +111,7 @@ class Credentials(object):
existing['ConnectServerId'] = server['ConnectServerId'] existing['ConnectServerId'] = server['ConnectServerId']
return existing return existing
else:
servers.append(server) servers.append(server)
return server return server

View file

@ -242,8 +242,8 @@ class Views(object):
temp_view['Media'] = media temp_view['Media'] = media
self.add_playlist(playlist_path, temp_view, True) self.add_playlist(playlist_path, temp_view, True)
self.add_nodes(node_path, temp_view, True) self.add_nodes(node_path, temp_view, True)
else: # Compensate for the duplicate.
index += 1 index += 1 # Compensate for the duplicate.
else: else:
if view['Media'] in ('movies', 'tvshows', 'musicvideos'): if view['Media'] in ('movies', 'tvshows', 'musicvideos'):
self.add_playlist(playlist_path, view) self.add_playlist(playlist_path, view)
@ -743,7 +743,8 @@ class Views(object):
temp_view['Name'] = "%s (%s)" % (view['Name'], translate(media)) temp_view['Name'] = "%s (%s)" % (view['Name'], translate(media))
self.window_node(index, temp_view, *node) self.window_node(index, temp_view, *node)
self.window_wnode(windex, temp_view, *node) self.window_wnode(windex, temp_view, *node)
else: # Add one to compensate for the duplicate.
# Add one to compensate for the duplicate.
index += 1 index += 1
windex += 1 windex += 1
else: else:

View file

@ -25,7 +25,7 @@ from helper import LazyLogger # noqa: F402
################################################################################################# #################################################################################################
LOG = LazyLogger(__name__) LOG = LazyLogger(__name__)
DELAY = int(settings('startupDelay') if settings('SyncInstallRunDone.bool') else 4 or 0) DELAY = int(settings('startupDelay') if settings('SyncInstallRunDone.bool') else 4)
################################################################################################# #################################################################################################