From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2A5E4138CCE for ; Sat, 16 May 2015 04:19:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C4061E0841; Sat, 16 May 2015 04:19:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 77598E0841 for ; Sat, 16 May 2015 04:19:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B1EAE340F36 for ; Sat, 16 May 2015 04:19:55 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 618F89AA for ; Sat, 16 May 2015 04:19:54 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1431749426.3ea4713d895cc1b341277c5b4db0f9d4b671b9cd.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/sync/modules/squashdelta/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/sync/modules/squashdelta/squashdelta.py X-VCS-Directories: pym/portage/sync/modules/squashdelta/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 3ea4713d895cc1b341277c5b4db0f9d4b671b9cd X-VCS-Branch: master Date: Sat, 16 May 2015 04:19:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a65ce2b3-30ca-408f-a02f-09de1148d747 X-Archives-Hash: 5a7736c7d4dbcc727cade6a31dd71f64 commit: 3ea4713d895cc1b341277c5b4db0f9d4b671b9cd Author: Brian Dolbec gentoo org> AuthorDate: Fri May 15 23:18:10 2015 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sat May 16 04:10:26 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3ea4713d portage/sync/modules/squashdelta: Fix Attribute error, None type object bug 549594 self.repo is only initialized as None in the __init__(). Initialize self.repo_re to None in __init__(). Correctly assign it in _configure() after the self._kwargs(kwargs) call has run. Fix several more code bugs while testing: initialize delta_path in sync() _openpgp_verify() return True since it is used as a boolean by the calling function. _update_mount() remove unused variable can_mount. X-Gentoo-Bug: 549594 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=549594 pym/portage/sync/modules/squashdelta/squashdelta.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pym/portage/sync/modules/squashdelta/squashdelta.py b/pym/portage/sync/modules/squashdelta/squashdelta.py index dbfdee9..6d956c6 100644 --- a/pym/portage/sync/modules/squashdelta/squashdelta.py +++ b/pym/portage/sync/modules/squashdelta/squashdelta.py @@ -35,9 +35,10 @@ class SquashDeltaSync(SyncBase): def __init__(self): super(SquashDeltaSync, self).__init__( 'squashmerge', 'dev-util/squashmerge') - self.repo_re = re.compile(self.repo.name + '-(.*)$') + self.repo_re = None def _configure(self): + self.repo_re = re.compile(self.repo.name + '-(.*)$') self.my_settings = portage.config(clone = self.settings) self.cache_location = DEFAULT_CACHE_LOCATION @@ -60,7 +61,7 @@ class SquashDeltaSync(SyncBase): if 'webrsync-gpg' in self.my_settings.features: # TODO: OpenPGP signature verification # raise SquashDeltaError if it fails - pass + return True def _parse_sha512sum(self, path): # sha512sum.txt parsing @@ -164,7 +165,6 @@ class SquashDeltaSync(SyncBase): def _update_mount(self, current_path): mount_cmd = ['mount', current_path, self.repo.location] - can_mount = True if os.path.ismount(self.repo.location): # need to umount old snapshot ret = portage.process.spawn(['umount', '-l', self.repo.location]) @@ -209,6 +209,7 @@ class SquashDeltaSync(SyncBase): old_snapshot, old_version, old_path = ( self._find_local_snapshot(current_path)) + delta_path = None if old_version: if old_version == new_version: logging.info('Snapshot up-to-date, verifying integrity.')