From 9a85fd0c971ed196ada8ece2d6df29037e2036b0 Mon Sep 17 00:00:00 2001 From: Daniel Ehlers Date: Mon, 18 Nov 2013 21:35:40 +0100 Subject: [PATCH] Fix utf-8 enforcing hack. The function getdefaultlocale takes one optional argument, so the replace should behave the same. --- bat2nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bat2nodes.py b/bat2nodes.py index ab4d5fd..917136a 100755 --- a/bat2nodes.py +++ b/bat2nodes.py @@ -9,7 +9,7 @@ from d3mapbuilder import D3MapBuilder # Force encoding to UTF-8 import locale # Ensures that subsequent open()s -locale.getpreferredencoding = lambda: 'UTF-8' # are UTF-8 encoded. +locale.getpreferredencoding = lambda _=None: 'UTF-8' # are UTF-8 encoded. import sys #sys.stdin = open('/dev/stdin', 'r')