From e8c9f0ea1e46de25153bfbbdb32264c58c877f6d Mon Sep 17 00:00:00 2001 From: Michael Hanke Date: Thu, 7 Dec 2023 20:15:46 +0100 Subject: [PATCH] Make result renderer tollerate `None` as a `uid` from a zipfile It renderes an empty string for others, in this case. The changeset aligned that. --- datalad_next/commands/ls_file_collection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datalad_next/commands/ls_file_collection.py b/datalad_next/commands/ls_file_collection.py index f06d6f9c..d39b3d26 100644 --- a/datalad_next/commands/ls_file_collection.py +++ b/datalad_next/commands/ls_file_collection.py @@ -391,7 +391,7 @@ def custom_result_renderer(res, **kwargs): # stick with numerical IDs (although less accessible), we cannot # know in general whether this particular system can map numerical # IDs to valid target names (think stored name in tarballs) - owner_info = f'{res["uid"]}:{res["gid"]}' if 'uid' in res else '' + owner_info = f'{res["uid"]}:{res["gid"]}' if res.get('uid') else '' ui.message('{mode} {size: >6} {owner: >9} {hts: >11} {item} ({type})'.format( mode=mode,