summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Loeffler <benedikt.loeffler@bmw.de>2019-01-30 16:08:36 +0100
committerBenedikt Loeffler <benedikt.loeffler@bmw.de>2019-01-30 16:08:36 +0100
commit363d881ab9291a2bbca4c0f3c270b873fd2ad009 (patch)
treeb6822cec16bd91d9c42c21a8d5221170bc300fd3
parent91e7e680a16dc17469195029750a0a3231586c10 (diff)
Fix flake8 error: E117 over-indented
Notes
Notes (review): Code-Review+2: Tobias Henkel <tobias.henkel@bmw.de> Code-Review+2: James E. Blair <corvus@inaugust.com> Workflow+1: James E. Blair <corvus@inaugust.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 30 Jan 2019 16:39:26 +0000 Reviewed-on: https://review.openstack.org/633974 Project: openstack-infra/zuul Branch: refs/heads/master
-rw-r--r--zuul/driver/gerrit/gerritmodel.py6
-rw-r--r--zuul/driver/github/githubmodel.py6
-rw-r--r--zuul/driver/github/githubreporter.py4
-rw-r--r--zuul/executor/server.py18
4 files changed, 17 insertions, 17 deletions
diff --git a/zuul/driver/gerrit/gerritmodel.py b/zuul/driver/gerrit/gerritmodel.py
index 687f5f3..46a034a 100644
--- a/zuul/driver/gerrit/gerritmodel.py
+++ b/zuul/driver/gerrit/gerritmodel.py
@@ -88,14 +88,14 @@ class GerritApprovalFilter(object):
88 for k, v in rapproval.items(): 88 for k, v in rapproval.items():
89 if k == 'username': 89 if k == 'username':
90 if (not v.search(by.get('username', ''))): 90 if (not v.search(by.get('username', ''))):
91 return False 91 return False
92 elif k == 'email': 92 elif k == 'email':
93 if (not v.search(by.get('email', ''))): 93 if (not v.search(by.get('email', ''))):
94 return False 94 return False
95 elif k == 'newer-than': 95 elif k == 'newer-than':
96 t = now - v 96 t = now - v
97 if (approval['grantedOn'] < t): 97 if (approval['grantedOn'] < t):
98 return False 98 return False
99 elif k == 'older-than': 99 elif k == 'older-than':
100 t = now - v 100 t = now - v
101 if (approval['grantedOn'] >= t): 101 if (approval['grantedOn'] >= t):
diff --git a/zuul/driver/github/githubmodel.py b/zuul/driver/github/githubmodel.py
index d654f4f..4a378af 100644
--- a/zuul/driver/github/githubmodel.py
+++ b/zuul/driver/github/githubmodel.py
@@ -108,14 +108,14 @@ class GithubCommonFilter(object):
108 for k, v in rreview.items(): 108 for k, v in rreview.items():
109 if k == 'username': 109 if k == 'username':
110 if (not v.search(by.get('username', ''))): 110 if (not v.search(by.get('username', ''))):
111 return False 111 return False
112 elif k == 'email': 112 elif k == 'email':
113 if (not v.search(by.get('email', ''))): 113 if (not v.search(by.get('email', ''))):
114 return False 114 return False
115 elif k == 'newer-than': 115 elif k == 'newer-than':
116 t = now - v 116 t = now - v
117 if (review['grantedOn'] < t): 117 if (review['grantedOn'] < t):
118 return False 118 return False
119 elif k == 'older-than': 119 elif k == 'older-than':
120 t = now - v 120 t = now - v
121 if (review['grantedOn'] >= t): 121 if (review['grantedOn'] >= t):
diff --git a/zuul/driver/github/githubreporter.py b/zuul/driver/github/githubreporter.py
index 8be4bb1..e57c746 100644
--- a/zuul/driver/github/githubreporter.py
+++ b/zuul/driver/github/githubreporter.py
@@ -157,12 +157,12 @@ class GithubReporter(BaseReporter):
157 self.log.debug('Reporting change %s, params %s, labels:\n%s' % 157 self.log.debug('Reporting change %s, params %s, labels:\n%s' %
158 (item.change, self.config, self._labels)) 158 (item.change, self.config, self._labels))
159 for label in self._labels: 159 for label in self._labels:
160 self.connection.labelPull(project, pr_number, label) 160 self.connection.labelPull(project, pr_number, label)
161 if self._unlabels: 161 if self._unlabels:
162 self.log.debug('Reporting change %s, params %s, unlabels:\n%s' % 162 self.log.debug('Reporting change %s, params %s, unlabels:\n%s' %
163 (item.change, self.config, self._unlabels)) 163 (item.change, self.config, self._unlabels))
164 for label in self._unlabels: 164 for label in self._unlabels:
165 self.connection.unlabelPull(project, pr_number, label) 165 self.connection.unlabelPull(project, pr_number, label)
166 166
167 def _formatMergeMessage(self, change): 167 def _formatMergeMessage(self, change):
168 message = '' 168 message = ''
diff --git a/zuul/executor/server.py b/zuul/executor/server.py
index 688e6db..219c234 100644
--- a/zuul/executor/server.py
+++ b/zuul/executor/server.py
@@ -548,15 +548,15 @@ class DeduplicateQueue(object):
548 548
549 549
550def _copy_ansible_files(python_module, target_dir): 550def _copy_ansible_files(python_module, target_dir):
551 library_path = os.path.dirname(os.path.abspath(python_module.__file__)) 551 library_path = os.path.dirname(os.path.abspath(python_module.__file__))
552 for fn in os.listdir(library_path): 552 for fn in os.listdir(library_path):
553 if fn == "__pycache__": 553 if fn == "__pycache__":
554 continue 554 continue
555 full_path = os.path.join(library_path, fn) 555 full_path = os.path.join(library_path, fn)
556 if os.path.isdir(full_path): 556 if os.path.isdir(full_path):
557 shutil.copytree(full_path, os.path.join(target_dir, fn)) 557 shutil.copytree(full_path, os.path.join(target_dir, fn))
558 else: 558 else:
559 shutil.copy(os.path.join(library_path, fn), target_dir) 559 shutil.copy(os.path.join(library_path, fn), target_dir)
560 560
561 561
562def check_varnames(var): 562def check_varnames(var):