From f550a523a5b4ed9f8dccfdbb8084b346298bf9d4 Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Thu, 14 Feb 2013 17:08:41 +0400 Subject: [PATCH] Fix for 3.7.7 samba --- calculate/lib/cl_template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calculate/lib/cl_template.py b/calculate/lib/cl_template.py index 7928b95..66391bb 100644 --- a/calculate/lib/cl_template.py +++ b/calculate/lib/cl_template.py @@ -5505,8 +5505,8 @@ gettext -d cl_template "$*" def fileIsUtf(self, fileName): """Проверяет файл на кодировку UTF-8""" if os.path.isfile(fileName): - FD = open(os.path.abspath(fileName)) - newTemplate = FD.read() + FD = open(os.path.abspath(fileName),'r') + newTemplate = FD.read(1)+FD.read() FD.close() try: newTemplate.decode("UTF-8")