| OLD | NEW |
| 1 # coding: utf-8 | |
| 2 | |
| 3 # This Source Code Form is subject to the terms of the Mozilla Public | 1 # This Source Code Form is subject to the terms of the Mozilla Public |
| 4 # License, v. 2.0. If a copy of the MPL was not distributed with this | 2 # License, v. 2.0. If a copy of the MPL was not distributed with this |
| 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. | 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 6 | 4 |
| 7 """ | 5 """ |
| 8 Update the public suffix list | 6 Update the public suffix list |
| 9 ============================== | 7 ============================== |
| 10 | 8 |
| 11 This script generates a js array of public suffixes (http://publicsuffix.org/) | 9 This script generates a js array of public suffixes (http://publicsuffix.org/) |
| 12 """ | 10 """ |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 51 |
| 54 def updatePSL(baseDir): | 52 def updatePSL(baseDir): |
| 55 """ | 53 """ |
| 56 writes the current public suffix list to js file in json format | 54 writes the current public suffix list to js file in json format |
| 57 """ | 55 """ |
| 58 | 56 |
| 59 psl = getPublicSuffixList() | 57 psl = getPublicSuffixList() |
| 60 file = open(os.path.join(baseDir, 'lib', 'publicSuffixList.js'), 'w') | 58 file = open(os.path.join(baseDir, 'lib', 'publicSuffixList.js'), 'w') |
| 61 print >>file, 'var publicSuffixes = ' + json.dumps(psl, sort_keys=True, inde
nt=4, separators=(',', ': ')) + ';' | 59 print >>file, 'var publicSuffixes = ' + json.dumps(psl, sort_keys=True, inde
nt=4, separators=(',', ': ')) + ';' |
| 62 file.close() | 60 file.close() |
| OLD | NEW |