Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 import re | 1 import re |
2 import os | 2 import os |
3 import sys | 3 import sys |
4 import json | 4 import json |
5 import urllib | 5 import urllib |
6 import errno | 6 import errno |
7 import logging | 7 import logging |
8 import time | 8 import time |
9 from xml.dom import minidom | 9 from xml.dom import minidom |
10 | 10 |
11 from jinja2 import contextfunction | 11 from jinja2 import contextfunction |
12 | 12 |
13 BROWSERS = {} | 13 BROWSERS = {} |
14 FIREFOX_URL = 'https://product-details.mozilla.org/1.0/firefox_versions.json', | 14 BASE_URL = 'https://product-details.mozilla.org/1.0' |
Vasily Kuznetsov
2016/08/29 17:27:52
The comma in the end is not only redundant, it act
| |
15 THUNDERBIRD_URL = 'https://product-details.mozilla.org/1.0/thunderbird_versions. json', | 15 FIREFOX_URL = BASE_URL + '/firefox_versions.json' |
Vasily Kuznetsov
2016/08/29 17:27:52
This line is too long according to our guidelines
| |
16 THUNDERBIRD_URL = BASE_URL + '/thunderbird_versions.json' | |
16 SEAMONKEY_URL = 'http://www.seamonkey-project.org/seamonkey_versions.json' | 17 SEAMONKEY_URL = 'http://www.seamonkey-project.org/seamonkey_versions.json' |
17 | 18 |
18 CHROME_UPDATE_XML = '''\ | 19 CHROME_UPDATE_XML = '''\ |
19 <?xml version="1.0" encoding="UTF-8"?> | 20 <?xml version="1.0" encoding="UTF-8"?> |
20 <request protocol="3.0" ismachine="0"> | 21 <request protocol="3.0" ismachine="0"> |
21 <os platform="win" version="99" arch="x64"/> | 22 <os platform="win" version="99" arch="x64"/> |
22 <app appid="{4DC8B4CA-1BDA-483E-B5FA-D3C12E15B62D}"> | 23 <app appid="{4DC8B4CA-1BDA-483E-B5FA-D3C12E15B62D}"> |
23 <updatecheck/> | 24 <updatecheck/> |
24 </app> | 25 </app> |
25 <app appid="{4DC8B4CA-1BDA-483E-B5FA-D3C12E15B62D}" ap="x64-beta-multi-chrome" > | 26 <app appid="{4DC8B4CA-1BDA-483E-B5FA-D3C12E15B62D}" ap="x64-beta-multi-chrome" > |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
242 file.seek(0) | 243 file.seek(0) |
243 json.dump(persistent_cache, file) | 244 json.dump(persistent_cache, file) |
244 file.truncate() | 245 file.truncate() |
245 | 246 |
246 if not versions['previous']: | 247 if not versions['previous']: |
247 logging.warning("Couldn't determine previous browser version, " | 248 logging.warning("Couldn't determine previous browser version, " |
248 'please set %s.previous in %s', browser, filename) | 249 'please set %s.previous in %s', browser, filename) |
249 | 250 |
250 cache[browser] = versions | 251 cache[browser] = versions |
251 return versions | 252 return versions |
LEFT | RIGHT |