summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Cholewiński <harry666t@gmail.com>2016-01-11 13:58:11 +0100
committerKamil Cholewiński <harry666t@gmail.com>2016-01-11 13:58:11 +0100
commit706440ef9cf073a9b452301e369613cf2de91685 (patch)
tree32cf4af0b23571f167d0f94e1ed5ea6fd14c6bde
parent9508e92918bbd8c44c256e29e28c8e5d87340bb8 (diff)
downloadjrep-706440ef9cf073a9b452301e369613cf2de91685.zip
jrep-706440ef9cf073a9b452301e369613cf2de91685.tar.gz
jrep-706440ef9cf073a9b452301e369613cf2de91685.tar.bz2
Add final newlines for --format=lines
-rwxr-xr-xjrep4
1 files changed, 2 insertions, 2 deletions
diff --git a/jrep b/jrep
index 3097e49..c294688 100755
--- a/jrep
+++ b/jrep
@@ -22,8 +22,8 @@ def linify(o):
simple_types = {str, unicode, int, long, float, bool, type(None)}
linify_complex = {
list: lambda oo: "\n".join(str(x) for x in oo
- if type(x) in simple_types),
- dict: lambda oo: "\n".join(oo.keys()),
+ if type(x) in simple_types) + "\n",
+ dict: lambda oo: "\n".join(oo.keys()) + "\n",
}
linifier = linify_complex.get(type(o), str)
return linifier(o)