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 6931C13888F for ; Wed, 7 Oct 2015 11:28:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EE39EE080C; Wed, 7 Oct 2015 11:28:40 +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 9CC15E080C for ; Wed, 7 Oct 2015 11:28:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B489134087F for ; Wed, 7 Oct 2015 11:28:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2C753279 for ; Wed, 7 Oct 2015 11:28:34 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1444217641.665fc43168025d76c7c474df1835beaa5088589f.blueness@gentoo> Subject: [gentoo-commits] proj/grss:master commit in: grs/ X-VCS-Repository: proj/grss X-VCS-Files: grs/Populate.py X-VCS-Directories: grs/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 665fc43168025d76c7c474df1835beaa5088589f X-VCS-Branch: master Date: Wed, 7 Oct 2015 11:28:34 +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: 95430527-4d9d-40b5-b56e-ee3c11f039c2 X-Archives-Hash: fd32dd843feacfeb20114bcb6c1f6115 commit: 665fc43168025d76c7c474df1835beaa5088589f Author: Anthony G. Basile gentoo org> AuthorDate: Wed Oct 7 11:34:01 2015 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Wed Oct 7 11:34:01 2015 +0000 URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=665fc431 grs/Populate.py: use isinstance() instead of type(). grs/Populate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/grs/Populate.py b/grs/Populate.py index db35ee2..c6dce8d 100644 --- a/grs/Populate.py +++ b/grs/Populate.py @@ -46,7 +46,8 @@ class Populate(): Execute(cmd, timeout=60, logfile=self.logfile) # Select the cycle - if cycle: self.select_cycle(cycle) + if cycle: + self.select_cycle(cycle) # Copy from the workdir to the system's portage configroot. cmd = 'rsync -av %s/ %s' % (self.workdir, self.portage_configroot) @@ -73,7 +74,7 @@ class Populate(): cycled_files.setdefault(cycle_no, []) cycled_files[cycle_no].append([dirpath, filename]) # If cycle is just a boolean, then default to the maximum cycle number. - if type(cycle) is bool: + if isinstance(cycle, bool): cycle_no = max(cycled_files) else: cycle_no = cycle