From 21c562fcb714827eb491e69ae7d6cd4ca0209a64 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 13 Sep 2021 18:01:22 +0300 Subject: [PATCH] Make "set_version.py" working with Python 2.7 as well. --- Telegram/build/set_version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/build/set_version.py b/Telegram/build/set_version.py index 9fb7e7f34..347c3e9ff 100644 --- a/Telegram/build/set_version.py +++ b/Telegram/build/set_version.py @@ -5,7 +5,7 @@ the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL ''' -import sys, os, re, subprocess +import sys, os, re, subprocess, io def finish(code): global executePath @@ -76,7 +76,7 @@ def checkChangelog(): global scriptPath, versionStr, versionStrSmall count = 0 - with open(scriptPath + '/../../changelog.txt', encoding='utf-8') as f: + with io.open(scriptPath + '/../../changelog.txt', encoding='utf-8') as f: for line in f: if line.startswith(versionStr + ' ') or line.startswith(versionStrSmall + ' '): count = count + 1