Skip to content

Commit

Permalink
Merge pull request #505 from citrus-it/list
Browse files Browse the repository at this point in the history
Traceback when listing packages with empty fields
  • Loading branch information
hadfl authored Dec 13, 2024
2 parents ef49a59 + ba91792 commit 1cb8ae2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,8 @@ def calc_fmtstr(attrs, data):

for entry in data:
for i, field in enumerate(attrs):
if not entry.get(field):
continue
if len(entry.get(field)) > widths[i]:
widths[i] = len(entry.get(field))

Expand Down

0 comments on commit 1cb8ae2

Please sign in to comment.