From 7636039adaac369a199db713f1f5bc5f09db7c14 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Thu, 23 Jan 2014 10:22:32 +0100 Subject: [PATCH] Fix compatibility of check_trans.py with Python 3. --- sandbox/check_trans.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sandbox/check_trans.py b/sandbox/check_trans.py index f1190839d..1b4c763b8 100755 --- a/sandbox/check_trans.py +++ b/sandbox/check_trans.py @@ -43,9 +43,9 @@ def _checkCore(corePath): potPath = os.path.join(os.getcwd(), 'locales', translation) po = open(potPath) if checkTranslation(pot, po): - print 'OK: ' + potPath + print('OK: ' + potPath) else: - print 'ERROR: ' + potPath + print('ERROR: ' + potPath) @changedir @@ -60,15 +60,15 @@ def checkPlugin(pluginPath): potPath = os.path.join(os.getcwd(), 'locales', translation) po = open(potPath) if checkTranslation(pot, po): - print 'OK: ' + potPath + print('OK: ' + potPath) else: - print 'ERROR: ' + potPath + print('ERROR: ' + potPath) def checkTranslation(pot, po): checking = False pot = set(map(operator.itemgetter(0), parse(pot))) po = set(map(operator.itemgetter(0), parse(po))) - diff = filter(lambda x:x not in po, pot) + diff = [x for x in pot if x not in po] return not bool(diff) if __name__ == '__main__':