Commit a4d97430 authored by Michal Čihař's avatar Michal Čihař

Make empty translation test compatible with translate-toolkit 1.14.0

The API has changed here (due to compatibility with Python 3), so once
new API is available we have to use it.
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 12336f92
......@@ -675,8 +675,15 @@ class FileFormat(object):
if store is None:
return False
if cls.monolingual is False and str(store) == b'':
return False
if cls.monolingual is False:
if hasattr(store, 'serialize'):
# ttkit API since 1.14.0
storebytes = bytes(store)
else:
# ttkit API 1.13.0 and older
storebytes = str(store)
if storebytes == b'':
return False
return True
......
......@@ -302,7 +302,6 @@ class ImportMoPoTest(ImportTest):
test_file = TEST_MO
def create_subproject(self):
# Needs to create PO file to have language pack option
return self.create_po()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment