Commits

Kirill Simonov committed f20c5cc

Minor fix to `retrieve()`.

  • Participants
  • Parent commits d2c9597

Comments (0)

Files changed (1)

File src/htsql/cmd/retrieve.py

 from ..tr.reduce import reduce
 from ..tr.dump import serialize
 from ..tr.lookup import guess_name
-from ..connect import DBError, Connect, Normalize
+from ..connect import DBError, Connect, normalize
 from ..error import EngineError
 
 
             assert profile.segment is not None
             normalizers = []
             for element in profile.segment.elements:
-                normalize = Normalize(element.domain)
-                normalizers.append(normalize())
+                normalizers.append(normalize(element.domain))
             record_name = profile.segment.name
             element_names = [element.name
                              for element in profile.segment.elements]
                 records = []
                 for row in cursor:
                     values = []
-                    for item, normalize in zip(row, normalizers):
-                        value = normalize(item)
+                    for item, normalizer in zip(row, normalizers):
+                        value = normalizer(item)
                         values.append(value)
                     records.append(record_class(*values))
                 connection.commit()