Fixed a couple corner cases in scripts when fields are empty
- Fixed added/removed count in scripts when an entry has no field in the expected results - Fixed a python-sort-type issue when by-field is missing in a result
This commit is contained in:
@@ -473,6 +473,9 @@ def main(obj_paths, *,
|
||||
with openio(args['use']) as f:
|
||||
reader = csv.DictReader(f, restval='')
|
||||
for r in reader:
|
||||
if not any('struct_'+k in r and r['struct_'+k].strip()
|
||||
for k in StructResult._fields):
|
||||
continue
|
||||
try:
|
||||
results.append(StructResult(
|
||||
**{k: r[k] for k in StructResult._by
|
||||
@@ -516,6 +519,9 @@ def main(obj_paths, *,
|
||||
with openio(args['diff']) as f:
|
||||
reader = csv.DictReader(f, restval='')
|
||||
for r in reader:
|
||||
if not any('struct_'+k in r and r['struct_'+k].strip()
|
||||
for k in StructResult._fields):
|
||||
continue
|
||||
try:
|
||||
diff_results.append(StructResult(
|
||||
**{k: r[k] for k in StructResult._by
|
||||
|
||||
Reference in New Issue
Block a user