Use mapfile to only create & parse mapfile strings, not files
authorW. Trevor King <wking@drexel.edu>
Tue, 8 Dec 2009 08:58:36 +0000 (03:58 -0500)
committerW. Trevor King <wking@drexel.edu>
Tue, 8 Dec 2009 08:58:36 +0000 (03:58 -0500)
libbe/storage/util/mapfile.py [moved from libbe/storage/vcs/util/mapfile.py with 90% similarity]

similarity index 90%
rename from libbe/storage/vcs/util/mapfile.py
rename to libbe/storage/util/mapfile.py
index 8e1e2790d1bf9609b8eaacc1b8209eddd7c1bece..a8d55163e7bddd18a8fd274402413d6bb1a36f1e 100644 (file)
@@ -112,15 +112,5 @@ def parse(contents):
     """
     return yaml.load(contents) or {}
 
-def map_save(vcs, path, map, allow_no_vcs=False):
-    """Save the map as a mapfile to the specified path"""
-    contents = generate(map)
-    vcs.set_file_contents(path, contents, allow_no_vcs, binary=True)
-
-def map_load(vcs, path, allow_no_vcs=False):
-    contents = vcs.get_file_contents(path, allow_no_vcs=allow_no_vcs,
-                                     binary=True)
-    return parse(contents)
-
 if libbe.TESTING == True:
     suite = doctest.DocTestSuite()