Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-portage-dev] [PATCH] squashdelta sync: fix incorrect use of _fetch()
Date: Sun, 17 May 2015 17:28:18
Message-Id: 1431883683-17883-1-git-send-email-mgorny@gentoo.org
1 Fix the use of ._fetch() method not to use the return value. Since the
2 code refactoring, it longer returns a boolean status. Instead, it raises
3 an exception if fetching fails.
4
5 Fixes: https://bugs.gentoo.org/show_bug.cgi?id=549716
6 ---
7 pym/portage/sync/modules/squashdelta/squashdelta.py | 3 +--
8 1 file changed, 1 insertion(+), 2 deletions(-)
9
10 diff --git a/pym/portage/sync/modules/squashdelta/squashdelta.py b/pym/portage/sync/modules/squashdelta/squashdelta.py
11 index 6d956c6..cc303be 100644
12 --- a/pym/portage/sync/modules/squashdelta/squashdelta.py
13 +++ b/pym/portage/sync/modules/squashdelta/squashdelta.py
14 @@ -135,8 +135,7 @@ class SquashDeltaSync(SyncBase):
15 else:
16 delta_path = os.path.join(self.cache_location, expected_delta)
17
18 - if not self._fetch(expected_delta, digests = my_digests):
19 - raise SquashDeltaError()
20 + self._fetch(expected_delta, digests = my_digests)
21 if not self.has_bin:
22 raise SquashDeltaError()
23
24 --
25 2.4.0

Replies