commit: 665fc43168025d76c7c474df1835beaa5088589f
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 7 11:34:01 2015 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> 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