diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-09-24 12:15:13 +0900 |
---|---|---|
committer | Gustaf Lundh <gustaf.lundh@sonymobile.com> | 2012-10-09 12:45:30 +0200 |
commit | 8a68ff96057ec58e524a3e41a2d8dca7b5d016bc (patch) | |
tree | 22f6971e8d3c4a90d11d3704602d073a852328b4 /subcmds/forall.py | |
parent | e3b1c45aebed329cbc9ad172b1d8e812cf208117 (diff) | |
download | git-repo-8a68ff96057ec58e524a3e41a2d8dca7b5d016bc.tar.gz |
Coding style cleanup
Fix the following issues reported by pylint:
C0321: More than one statement on a single line
W0622: Redefining built-in 'name'
W0612: Unused variable 'name'
W0613: Unused argument 'name'
W0102: Dangerous default value 'value' as argument
W0105: String statement has no effect
Also fixed a few cases of inconsistent indentation.
Change-Id: Ie0db839e7c57d576cff12d8c055fe87030d00744
Diffstat (limited to 'subcmds/forall.py')
-rw-r--r-- | subcmds/forall.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/subcmds/forall.py b/subcmds/forall.py index 9436f4e5..76a02688 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py | |||
@@ -208,7 +208,6 @@ terminal and are not redirected. | |||
208 | return self.fd.fileno() | 208 | return self.fd.fileno() |
209 | 209 | ||
210 | empty = True | 210 | empty = True |
211 | didout = False | ||
212 | errbuf = '' | 211 | errbuf = '' |
213 | 212 | ||
214 | p.stdin.close() | 213 | p.stdin.close() |
@@ -220,7 +219,7 @@ terminal and are not redirected. | |||
220 | fcntl.fcntl(s.fd, fcntl.F_SETFL, flags | os.O_NONBLOCK) | 219 | fcntl.fcntl(s.fd, fcntl.F_SETFL, flags | os.O_NONBLOCK) |
221 | 220 | ||
222 | while s_in: | 221 | while s_in: |
223 | in_ready, out_ready, err_ready = select.select(s_in, [], []) | 222 | in_ready, _out_ready, _err_ready = select.select(s_in, [], []) |
224 | for s in in_ready: | 223 | for s in in_ready: |
225 | buf = s.fd.read(4096) | 224 | buf = s.fd.read(4096) |
226 | if not buf: | 225 | if not buf: |
@@ -229,9 +228,7 @@ terminal and are not redirected. | |||
229 | continue | 228 | continue |
230 | 229 | ||
231 | if not opt.verbose: | 230 | if not opt.verbose: |
232 | if s.fd == p.stdout: | 231 | if s.fd != p.stdout: |
233 | didout = True | ||
234 | else: | ||
235 | errbuf += buf | 232 | errbuf += buf |
236 | continue | 233 | continue |
237 | 234 | ||