summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fingerchange.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/fingerchange.py b/fingerchange.py
index 25f4e93..96e37d9 100644
--- a/fingerchange.py
+++ b/fingerchange.py
@@ -34,8 +34,11 @@ def format_url(url):
return '<{}>'.format(url)
-def format_field(key, value):
- return ' :: {} {}\n'.format(key, value)
+def format_field(key, value=None, indent=1):
+ if not value:
+ return '{}:: {}\n'.format(' '*indent, key)
+
+ return '{}:: {} {}\n'.format(' '*indent, key, value)
def format_header(header, filler):