mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-31 16:36:20 +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']
|
else details['readwrite']
|
||||||
).decode("utf-8")
|
).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])
|
max_width = max([len(quote_output(name)) for name in data.keys()] + [0])
|
||||||
fmt = "%" + str(max_width) + "s: %s"
|
fmt = "%" + str(max_width) + "s: %s"
|
||||||
output = "\n".join(list(
|
output = "\n".join(list(
|
||||||
fmt % (name, dircap(details))
|
format_dircap(name, details)
|
||||||
for name, details
|
for name, details
|
||||||
in data.items()
|
in data.items()
|
||||||
))
|
))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user