Don't hardcode black box spacing values.

This commit is contained in:
Solderpunk 2023-11-17 19:59:12 +01:00
parent 4f354ab291
commit a9b34278a8
1 changed files with 3 additions and 1 deletions

View File

@ -1445,8 +1445,10 @@ current gemini browsing session."""
lines.append(("Cache hits:", self.log["cache_hits"]))
lines.append(("Redirects followed:", self.log["redirects_followed"]))
# Print
ljust = max((len(k) for k,v in lines))
rjust = max((len(str(v)) for k,v in lines))
for key, value in lines:
print(key.ljust(24) + str(value).rjust(8))
print(key.ljust(ljust+4) + str(value).rjust(rjust))
### The end!
def do_quit(self, *args):