[CRIU] [PATCH] crit: enable --pretty by default

Tycho Andersen tycho.andersen at canonical.com
Tue Jul 21 10:06:26 PDT 2015


This is probably what everyone wants anyway :). This patch also adds a
--no-pretty option if people really want to disable it.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 crit | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/crit b/crit
index 350362c..3d0ee04 100755
--- a/crit
+++ b/crit
@@ -52,15 +52,20 @@ def main():
 	decode_parser = subparsers.add_parser('decode',
 			help = 'convert criu image from binary type json')
 	decode_parser.add_argument('--pretty',
+			dest = 'pretty',
 			help = 'Multiline with indents and some numerical fields in field-specific format',
 			action = 'store_true')
+	decode_parser.add_argument('--no-pretty',
+			dest = 'pretty',
+			help = 'Disable indenting and formatting.',
+			action = 'store_false')
 	decode_parser.add_argument('-i',
 			    '--in',
 			help = 'criu image in binary format to be decoded (stdin by default)')
 	decode_parser.add_argument('-o',
 			    '--out',
 			help = 'where to put criu image in json format (stdout by default)')
-	decode_parser.set_defaults(func=decode)
+	decode_parser.set_defaults(func=decode, pretty=True)
 
 	# Encode
 	encode_parser = subparsers.add_parser('encode',
-- 
2.1.4



More information about the CRIU mailing list