]> git.openstreetmap.org Git - nominatim.git/commitdiff
ignore encoding errors when reading log files
authorSarah Hoffmann <sarah.hoffmann@kernkonzept.com>
Tue, 16 Dec 2014 08:18:36 +0000 (09:18 +0100)
committerSarah Hoffmann <sarah.hoffmann@kernkonzept.com>
Tue, 16 Dec 2014 08:18:36 +0000 (09:18 +0100)
munin/nominatim_query_speed_querylog
munin/nominatim_requests_querylog

index 1959e38e42e1a6cd4662213ec0cc783721fb20af..d663faf1a32d113d06d3e1aa7d22b01c8c9b35cc 100755 (executable)
@@ -4,7 +4,7 @@
 #
 # Uses the query log.
 #
-# Parameters: 
+# Parameters:
 #
 #       config   (required)
 #       autoconf (optional - used by munin-config)
@@ -47,7 +47,7 @@ class LogFile:
     """ A query log file, unpacked. """
 
     def __init__(self, filename):
-        self.fd = open(filename, encoding='utf-8')
+        self.fd = open(filename, encoding='utf-8', errors='replace')
         self.len = os.path.getsize(filename)
 
     def __del__(self):
index 64293d6fdad9b7da862315cda52b8b2563c4fa3c..8538a95ccfb641c1be5315b81be076cd360490c7 100755 (executable)
@@ -40,7 +40,7 @@ class LogFile:
     """ A query log file, unpacked. """
 
     def __init__(self, filename):
-        self.fd = open(filename, encoding='utf-8')
+        self.fd = open(filename, encoding='utf-8', errors='replace')
         self.len = os.path.getsize(filename)
 
     def __del__(self):