changeset 38999:56528729f7bd

module: use list on line-by-line iteration
author Dmitry Selyutin <ghostmansd@gmail.com>
date Thu, 28 Sep 2017 10:05:15 +0300
parents da184cd21e95
children 33e15f016137
files pygnulib/module.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pygnulib/module.py	Thu Sep 28 10:03:35 2017 +0300
+++ b/pygnulib/module.py	Thu Sep 28 10:05:15 2017 +0300
@@ -410,12 +410,12 @@
                 match = File._PATTERN_.split(stream.read())[1:]
             for (group, value) in zip(match[::2], match[1::2]):
                 (typeid, key) = File._TABLE_[group]
-                if typeid is set:
-                    lines = set()
+                if typeid is (list, set, tuple):
+                    lines = []
                     for line in value.splitlines():
                         if not line.strip() or line.startswith("#"):
                             continue
-                        lines.add(line)
+                        lines += [line]
                     table[key] = lines
                 else:
                     table[key] = value.strip()