aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/portage/_emirrordist')
-rw-r--r--lib/portage/_emirrordist/FetchTask.py36
1 files changed, 17 insertions, 19 deletions
diff --git a/lib/portage/_emirrordist/FetchTask.py b/lib/portage/_emirrordist/FetchTask.py
index f2cf2aa20..f2342362d 100644
--- a/lib/portage/_emirrordist/FetchTask.py
+++ b/lib/portage/_emirrordist/FetchTask.py
@@ -230,12 +230,11 @@ class FetchTask(CompositeTask):
if self._fs_mirror_stack:
self._fetch_fs(self._fs_mirror_stack.pop())
return
- else:
- uri = self._next_uri()
- if uri is not None:
- self._tried_uris.add(uri)
- self._fetch_uri(uri)
- return
+ uri = self._next_uri()
+ if uri is not None:
+ self._tried_uris.add(uri)
+ self._fetch_uri(uri)
+ return
if self._tried_uris:
msg = "all uris failed"
@@ -350,14 +349,14 @@ class FetchTask(CompositeTask):
self.returncode = os.EX_OK
self.wait()
return
- else:
- self._start_task(
- FileCopier(src_path=src, dest_path=dest,
- background=(self.background and
- self._log_path is not None),
- logfile=self._log_path),
- self._fs_mirror_copier_exit)
- return
+
+ self._start_task(
+ FileCopier(src_path=src, dest_path=dest,
+ background=(self.background and
+ self._log_path is not None),
+ logfile=self._log_path),
+ self._fs_mirror_copier_exit)
+ return
self._try_next_mirror()
@@ -598,11 +597,10 @@ class FetchTask(CompositeTask):
def _select_hash(self):
if default_hash_name in self.digests:
return default_hash_name
- else:
- for hash_name in self.digests:
- if hash_name != "size" and \
- hash_name in portage.checksum.get_valid_checksum_keys():
- return hash_name
+ for hash_name in self.digests:
+ if hash_name != "size" and \
+ hash_name in portage.checksum.get_valid_checksum_keys():
+ return hash_name
return None