diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-03-13 14:23:38 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-03-13 15:50:51 +0200 |
commit | f4e308bd1882875bcdd6e347e27f6795233b8af6 (patch) | |
tree | 2c3c7dc2331c3b070b318c4b9319f0f01941f603 | |
parent | 553bc915c294f40b25f64c26b3fe88b80e0a740e (diff) | |
download | obnam-f4e308bd1882875bcdd6e347e27f6795233b8af6.tar.gz |
Make dump-bag to use YAML markers between objs
-rwxr-xr-x | dump-bag | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright 2015 Lars Wirzenius +# Copyright 2015-2016 Lars Wirzenius # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,7 +37,5 @@ for filename in sys.argv[1:]: blob = strip_filtering(blob) bag = obnamlib.deserialise_bag(blob) - decoded = [] - for obj_blob in bag: - obj = obnamlib.deserialise_object(obj_blob) - yaml.safe_dump(obj, stream=sys.stdout, default_flow_style=False) + objs = [obnamlib.deserialise_object(obj_blob) for obj_blob in bag] + yaml.safe_dump_all(objs, stream=sys.stdout, default_flow_style=False) |