[diffoscope] 04/04: Ensure 4-line indentation.
Chris Lamb
chris at chris-lamb.co.uk
Sat Mar 3 23:46:07 CET 2018
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit e580d202d7a397bf3477f4392582c21dc061bac0
Author: Chris Lamb <lamby at debian.org>
Date: Sat Mar 3 22:45:43 2018 +0000
Ensure 4-line indentation.
---
diffoscope/comparators/utils/command.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/diffoscope/comparators/utils/command.py b/diffoscope/comparators/utils/command.py
index 75f8bae..22bdd91 100644
--- a/diffoscope/comparators/utils/command.py
+++ b/diffoscope/comparators/utils/command.py
@@ -26,7 +26,6 @@ logger = logging.getLogger(__name__)
class Command(object, metaclass=abc.ABCMeta):
-
MAX_STDERR_LINES = 50
def __init__(self, path):
@@ -49,7 +48,6 @@ class Command(object, metaclass=abc.ABCMeta):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
-
self.stderr = self._read_stderr()
@property
@@ -82,14 +80,16 @@ class Command(object, metaclass=abc.ABCMeta):
def _read_stderr(self):
buf = ""
lines = self._process.stderr.splitlines(True)
+
for index, line in enumerate(lines):
- if index >= Command.MAX_STDERR_LINES:
- break
- buf += line.decode('utf-8', errors='replace')
+ if index >= Command.MAX_STDERR_LINES:
+ break
+ buf += line.decode('utf-8', errors='replace')
if len(lines) > Command.MAX_STDERR_LINES:
- buf += '[ {} lines ignored ]\n'.format(
- len(lines) - Command.MAX_STDERR_LINES)
+ buf += '[ {} lines ignored ]\n'.format(
+ len(lines) - Command.MAX_STDERR_LINES,
+ )
return buf
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list