mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 11:16:24 +00:00
Slightly clean up formatting implementation
This commit is contained in:
parent
066e98874b
commit
6f80862ec5
@ -176,10 +176,13 @@ def list_aliases(options):
|
||||
else details['readwrite']
|
||||
).decode("utf-8")
|
||||
|
||||
def format_dircap(name, details):
|
||||
return fmt % (name, dircap(details))
|
||||
|
||||
max_width = max([len(quote_output(name)) for name in data.keys()] + [0])
|
||||
fmt = "%" + str(max_width) + "s: %s"
|
||||
output = "\n".join(list(
|
||||
fmt % (name, dircap(details))
|
||||
format_dircap(name, details)
|
||||
for name, details
|
||||
in data.items()
|
||||
))
|
||||
|
Loading…
Reference in New Issue
Block a user