diff options
author | Matěj Cepl <mcepl@redhat.com> | 2012-03-08 19:37:34 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2012-03-08 19:37:34 +0100 |
commit | 8ac3747446cb2e8b0749e91cb6e6dbf318efe516 (patch) | |
tree | 2ec279889bc9e0365eb4ceccd2dbb3cbac1903b3 /yamlish.py | |
parent | d9f2aa1f9d1066a168700c4e356db4f26772468a (diff) | |
download | yamlish-8ac3747446cb2e8b0749e91cb6e6dbf318efe516.tar.gz |
All tests succeeding!!!
Diffstat (limited to 'yamlish.py')
-rw-r--r-- | yamlish.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -172,10 +172,12 @@ def dump(source, destination): if isinstance(destination, (str, unicode)): with open(destination, "w") as outf: dump(source, outf) - elif isinstance(destination, file): + elif getattr(destination, "file"): yaml.dump(source, destination, encoding="utf-8", default_flow_style=False, canonical=False, Dumper=yaml.SafeDumper) + else: + raise NameError def dumps(source): """ |