summaryrefslogtreecommitdiff
path: root/test/CheckOptions.py
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2016-01-27 10:44:41 +0100
committerJohn Wiegley <johnw@newartisans.com>2019-12-05 15:06:44 +0100
commite1bba5d977a8b9385e9ffdb05861833485003d23 (patch)
tree40876bb3d289ced0fd871e94cc9e79c9e934327b /test/CheckOptions.py
parente264eb618b8eabf9670084f40687af916a63567e (diff)
downloadfork-ledger-e1bba5d977a8b9385e9ffdb05861833485003d23.tar.gz
fork-ledger-e1bba5d977a8b9385e9ffdb05861833485003d23.tar.bz2
fork-ledger-e1bba5d977a8b9385e9ffdb05861833485003d23.zip
Make tests scripts Python 3 compatible
Diffstat (limited to 'test/CheckOptions.py')
-rwxr-xr-xtest/CheckOptions.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/CheckOptions.py b/test/CheckOptions.py
index e4a1fdc3..dc865532 100755
--- a/test/CheckOptions.py
+++ b/test/CheckOptions.py
@@ -36,6 +36,7 @@ class CheckOptions (object):
def find_functions(self, filename):
return self.find_pattern(filename, self.function_pattern)
+
def find_alternates(self):
command = shlex.split('grep --no-filename OPT_ALT')
for source_file in ['session', 'report']:
@@ -53,7 +54,7 @@ class CheckOptions (object):
pipe = Popen('%s --debug option.names parse true' %
self.ledger, shell=True, stdout=PIPE, stderr=PIPE)
regex = re.compile('\[DEBUG\]\s+Option:\s+(.*?)_?$')
- ledger_options = {match.group(1).replace('_', '-') for match in {regex.search(line.decode()) for line in pipe.stderr} if match}
+ ledger_options = {match.group(1).replace('_', '-') for match in {regex.search(line.decode()) for line in pipe.stderr.readlines()} if match}
return ledger_options
def ledger_functions(self):