summaryrefslogtreecommitdiff
path: root/scripts/list-overlaps
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-07-15 12:23:49 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-07-15 12:23:49 +0000
commite8adedb8f3f27d9212caf277b8e8f7c6792a20c2 (patch)
treef8460c9ff73cea780d944f18d1bab49f2653b1cf /scripts/list-overlaps
parent3f686a074fdb66e75e67e276d21bdc604b34920c (diff)
parent40a5c752de62dd1b3ef3ec0850f1f24e7af67052 (diff)
downloadmorph-e8adedb8f3f27d9212caf277b8e8f7c6792a20c2.tar.gz
Fix JSON file handling to be binary filename safe
Reviewed-by: Lars Wirzenius Reviewed-by: Pedro Alvarez
Diffstat (limited to 'scripts/list-overlaps')
-rwxr-xr-xscripts/list-overlaps4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/list-overlaps b/scripts/list-overlaps
index 5fe45a0e..d092ba75 100755
--- a/scripts/list-overlaps
+++ b/scripts/list-overlaps
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (C) 2011-2012 Codethink Limited
+# Copyright (C) 2011-2014 Codethink Limited
#
# 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
@@ -27,7 +27,7 @@ class ListOverlaps(cliapp.Application):
@staticmethod
def _load_overlap(filename):
- data = json.load(open(filename))
+ data = json.load(open(filename), encoding='unicode-escape')
overlaps = dict((frozenset(pair[0]), set(pair[1])) for pair in data)
return overlaps