cm_crowdin_sync: Consistent prints
Change-Id: I81af8406fab315892bef228e009e378c3ca9e6d0
diff --git a/cm_crowdin_aosp_sync.py b/cm_crowdin_aosp_sync.py
index 4456515..3bf67eb 100755
--- a/cm_crowdin_aosp_sync.py
+++ b/cm_crowdin_aosp_sync.py
@@ -158,11 +158,11 @@
try:
repo.git.commit(m='Automatic translation import')
repo.git.push('ssh://' + username + '@review.cyanogenmod.org:29418/' + name, 'HEAD:refs/for/' + branch)
- print 'Succesfully pushed commit for ' + name
+ print('Succesfully pushed commit for ' + name)
except:
# If git commit fails, it's probably because of no changes.
# Just continue.
- print 'No commit pushed (probably empty?) for ' + name
+ print('No commit pushed (probably empty?) for ' + name)
print('Welcome to the CM Crowdin sync script!')
@@ -242,13 +242,13 @@
# We hate empty, useless files. Crowdin exports them with <resources/> (sometimes with xliff).
# That means: easy to find
if '<resources/>' in open(xml_file).read():
- print ('Removing ' + xml_file)
+ print('Removing ' + xml_file)
os.remove(xml_file)
elif '<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"/>' in open(xml_file).read():
- print ('Removing ' + xml_file)
+ print('Removing ' + xml_file)
os.remove(xml_file)
elif '<resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"/>' in open(xml_file).read():
- print ('Removing ' + xml_file)
+ print('Removing ' + xml_file)
os.remove(xml_file)
print('\nSTEP 5: Push translations to Git')
@@ -279,7 +279,7 @@
branch = project_item.attributes['revision'].value
else:
branch = 'cm-11.0'
- print 'Committing ' + project_item.attributes['name'].value + ' on branch ' + branch + ' (based on android/default.xml or extra_packages.xml)'
+ print('Committing ' + project_item.attributes['name'].value + ' on branch ' + branch + ' (based on android/default.xml or extra_packages.xml)')
push_as_commit(good_path, project_item.attributes['name'].value, branch)
print('\nSTEP 6: Done!')