Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions share/metkit/make-yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ def ids(cursor, prefix, asList, lowercase):
# Convert list of lists to dictionary
IDS = {item[0]: item[1:] for item in IDS}

cursor.execute("select * from " + prefix)
cursor.execute("select id,shortName,name,units_id from " + prefix)

for data in cursor.fetchall():
paramid, abbr, longname = int(data[0]), data[1], data[2]
paramid, abbr, longname, unit_id = int(data[0]), data[1], data[2], data[3]
if lowercase:
abbr = abbr.lower()

Expand All @@ -63,7 +63,7 @@ def ids(cursor, prefix, asList, lowercase):
if not abbr:
abbr = "_%s_%06d" % (prefix, paramid,)

entry = [abbr.strip(), longname.strip()]
entry = [abbr.strip(), longname.strip(), unit_id]

if paramid in PRODGEN:
pgen = [str(x).lower() for x in PRODGEN[paramid]]
Expand Down
Loading
Loading