From: W. Trevor King Date: Thu, 25 Oct 2012 12:03:30 +0000 (-0400) Subject: storage:util:mapfile: fix YAML -> JSON in docstrings. X-Git-Tag: 1.1.0~66 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b4cc4bb4b7b5d3311158fdabd8296284e36aff62;p=be.git storage:util:mapfile: fix YAML -> JSON in docstrings. This should have been done back in: commit a95915c6c7d6a4e29c1e5547580e0c1fed2467e1 Author: W. Trevor King Date: Mon Sep 17 08:14:21 2012 -0400 storage:util:mapfile: convert YAML settings to JSON. I also add an empty-settings generation as a sanity check. --- diff --git a/libbe/storage/util/mapfile.py b/libbe/storage/util/mapfile.py index d17f0d3..71e5b0d 100644 --- a/libbe/storage/util/mapfile.py +++ b/libbe/storage/util/mapfile.py @@ -40,12 +40,14 @@ class InvalidMapfileContents (Exception): def generate(map): - """Generate a YAML mapfile content string. + """Generate a JSON mapfile content string. Examples -------- >>> import sys + >>> sys.stdout.write(generate({})) + {} >>> sys.stdout.write(generate({'q':'p'})) { @@ -100,7 +102,7 @@ def generate(map): return '\n\n\n\n\n\n\n'.join(lines) + '\n' def parse(contents): - """Parse a YAML mapfile string. + """Parse a JSON mapfile string. Examples --------