aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDeathamns <deathamns@gmail.com>2014-12-20 09:27:53 +0100
committerDeathamns <deathamns@gmail.com>2015-01-13 07:29:32 +0100
commita07b3a1d3ea9017c2d94895bae2c9a51e63f21c3 (patch)
treefcf2a97712e15974c3e8530d32551889acb20171 /tools
parent8a19f32373e3550227fdf4b08b2b23520b2192e6 (diff)
downloaduBlock-a07b3a1d3ea9017c2d94895bae2c9a51e63f21c3.zip
uBlock-a07b3a1d3ea9017c2d94895bae2c9a51e63f21c3.tar.gz
uBlock-a07b3a1d3ea9017c2d94895bae2c9a51e63f21c3.tar.bz2
Python2 compatibility for build scripts
Diffstat (limited to 'tools')
-rw-r--r--tools/make-firefox-meta.py10
-rwxr-xr-xtools/make-safari-meta.py2
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/make-firefox-meta.py b/tools/make-firefox-meta.py
index a4ebe40..fe6e978 100644
--- a/tools/make-firefox-meta.py
+++ b/tools/make-firefox-meta.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
import os
import json
@@ -43,19 +43,19 @@ for alpha2 in os.listdir(source_locale_dir):
with open(locale_path, 'wt', encoding='utf-8', newline='\n') as f:
for string_name in string_data:
f.write(string_name)
- f.write('=')
+ f.write(u'=')
f.write(string_data[string_name]['message'].replace('\n', r'\n'))
- f.write('\n')
+ f.write(u'\n')
# generate chrome.manifest file
chrome_manifest = pj(build_dir, 'chrome.manifest')
with open(chrome_manifest, 'at', encoding='utf-8', newline='\n') as f:
- f.write('\nlocale ublock en ./locale/en/\n')
+ f.write(u'\nlocale ublock en ./locale/en/\n')
for alpha2 in language_codes:
if alpha2 != 'en':
- f.write('locale ublock ' + alpha2 + ' ./locale/' + alpha2 + '/\n')
+ f.write(u'locale ublock ' + alpha2 + ' ./locale/' + alpha2 + '/\n')
rmtree(source_locale_dir)
diff --git a/tools/make-safari-meta.py b/tools/make-safari-meta.py
index ad6a63c..2726732 100755
--- a/tools/make-safari-meta.py
+++ b/tools/make-safari-meta.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
import os
import json