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,8 +260,8 @@ class ConnectionManager(object):
}
servers.append(info)
else:
return servers
return servers
# TODO: Make IPv6 compatable
def _convert_endpoint_address_to_manual_address(self, info):

View file

@ -111,9 +111,9 @@ class Credentials(object):
existing['ConnectServerId'] = server['ConnectServerId']
return existing
else:
servers.append(server)
return server
servers.append(server)
return server
def _date_object(self, date):
# Convert string to date

View file

@ -242,8 +242,8 @@ class Views(object):
temp_view['Media'] = media
self.add_playlist(playlist_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:
if view['Media'] in ('movies', 'tvshows', 'musicvideos'):
self.add_playlist(playlist_path, view)
@ -743,9 +743,10 @@ class Views(object):
temp_view['Name'] = "%s (%s)" % (view['Name'], translate(media))
self.window_node(index, temp_view, *node)
self.window_wnode(windex, temp_view, *node)
else: # Add one to compensate for the duplicate.
index += 1
windex += 1
# Add one to compensate for the duplicate.
index += 1
windex += 1
else:
for node in NODES[view['Media']]:

View file

@ -25,7 +25,7 @@ from helper import LazyLogger # noqa: F402
#################################################################################################
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)
#################################################################################################