bin/find-german-comments | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 1dec3cb29bd7ec028d6b2139d0199225b5cf5d67 Author: Phillip Sz <phillip.sze...@gmail.com> Date: Wed May 18 11:38:53 2016 +0200 find-german-comments: let's use python 3 Under python 3 we must use bytes. Change-Id: I86d2a875f4e06a9cb9724d86348f420bb8ea19e9 Reviewed-on: https://gerrit.libreoffice.org/25084 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> diff --git a/bin/find-german-comments b/bin/find-german-comments index 53dbd1d..86dfe547 100755 --- a/bin/find-german-comments +++ b/bin/find-german-comments @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 ######################################################################## # # Copyright (c) 2010 Jonas Jensen, Miklos Vajna @@ -131,8 +131,8 @@ class Parser: unsure, just don't warn, there are strings where you just can't teremine the results reliably, like '#110680#' """ - self.text_cat.stdin.write(s) - self.text_cat.stdin.write("\n") + self.text_cat.stdin.write(bytes(s, 'utf-8')) + self.text_cat.stdin.write(bytes("\n", 'utf-8')) self.text_cat.stdin.flush() lang = self.text_cat.stdout.readline().strip() return lang @@ -146,7 +146,7 @@ class Parser: s = s.replace('\n', ' ') if len(s) < 32 or len(s.split()) < 4: return False - return "german" == self.get_lang(s) + return b"german" == self.get_lang(s) def check_file(self, path): """ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits