mirror of
https://github.com/unitedstates/congress-legislators.git
synced 2025-12-25 02:14:46 -05:00
Patch up comment block preservation to not depend on the original object getting passed from load to save, by reading comment block at write-time. Also removes the need for another YAML serializer.
This commit is contained in:
@@ -328,7 +328,8 @@ def yaml_load(path, use_cache=True):
|
||||
return data
|
||||
|
||||
def yaml_dump(data, path):
|
||||
rtyaml.dump(data, open(path, "w"))
|
||||
# open for reading as well as writing
|
||||
rtyaml.dump(data, open(path, "r+"))
|
||||
|
||||
# Store in a pickled file for fast access later.
|
||||
import cPickle as pickle, hashlib
|
||||
|
||||
Reference in New Issue
Block a user