diff --git a/zuul/driver/gerrit/gerritmodel.py b/zuul/driver/gerrit/gerritmodel.py index 687f5f3a07..46a034a097 100644 --- a/zuul/driver/gerrit/gerritmodel.py +++ b/zuul/driver/gerrit/gerritmodel.py @@ -88,14 +88,14 @@ class GerritApprovalFilter(object): for k, v in rapproval.items(): if k == 'username': if (not v.search(by.get('username', ''))): - return False + return False elif k == 'email': if (not v.search(by.get('email', ''))): - return False + return False elif k == 'newer-than': t = now - v if (approval['grantedOn'] < t): - return False + return False elif k == 'older-than': t = now - v if (approval['grantedOn'] >= t): diff --git a/zuul/driver/github/githubmodel.py b/zuul/driver/github/githubmodel.py index d654f4f864..4a378af60c 100644 --- a/zuul/driver/github/githubmodel.py +++ b/zuul/driver/github/githubmodel.py @@ -108,14 +108,14 @@ class GithubCommonFilter(object): for k, v in rreview.items(): if k == 'username': if (not v.search(by.get('username', ''))): - return False + return False elif k == 'email': if (not v.search(by.get('email', ''))): - return False + return False elif k == 'newer-than': t = now - v if (review['grantedOn'] < t): - return False + return False elif k == 'older-than': t = now - v if (review['grantedOn'] >= t): diff --git a/zuul/driver/github/githubreporter.py b/zuul/driver/github/githubreporter.py index 8be4bb1071..e57c746913 100644 --- a/zuul/driver/github/githubreporter.py +++ b/zuul/driver/github/githubreporter.py @@ -157,12 +157,12 @@ class GithubReporter(BaseReporter): self.log.debug('Reporting change %s, params %s, labels:\n%s' % (item.change, self.config, self._labels)) for label in self._labels: - self.connection.labelPull(project, pr_number, label) + self.connection.labelPull(project, pr_number, label) if self._unlabels: self.log.debug('Reporting change %s, params %s, unlabels:\n%s' % (item.change, self.config, self._unlabels)) for label in self._unlabels: - self.connection.unlabelPull(project, pr_number, label) + self.connection.unlabelPull(project, pr_number, label) def _formatMergeMessage(self, change): message = '' diff --git a/zuul/executor/server.py b/zuul/executor/server.py index 688e6db1bd..219c2342b6 100644 --- a/zuul/executor/server.py +++ b/zuul/executor/server.py @@ -548,15 +548,15 @@ class DeduplicateQueue(object): def _copy_ansible_files(python_module, target_dir): - library_path = os.path.dirname(os.path.abspath(python_module.__file__)) - for fn in os.listdir(library_path): - if fn == "__pycache__": - continue - full_path = os.path.join(library_path, fn) - if os.path.isdir(full_path): - shutil.copytree(full_path, os.path.join(target_dir, fn)) - else: - shutil.copy(os.path.join(library_path, fn), target_dir) + library_path = os.path.dirname(os.path.abspath(python_module.__file__)) + for fn in os.listdir(library_path): + if fn == "__pycache__": + continue + full_path = os.path.join(library_path, fn) + if os.path.isdir(full_path): + shutil.copytree(full_path, os.path.join(target_dir, fn)) + else: + shutil.copy(os.path.join(library_path, fn), target_dir) def check_varnames(var):