| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1bdbf87 commit c20eb4f
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1287,8 +1287,8 @@ def icu_download(path): | |||
| 1287 | 1287 | if (md5 == gotmd5): | |
| 1288 | 1288 | return targetfile | |
| 1289 | 1289 | else: | |
| 1290 | - error('Expected: %s *MISMATCH*' % md5) | ||
| 1291 | - error('\n ** Corrupted ZIP? Delete %s to retry download.\n' % targetfile) | ||
| 1290 | + warn('Expected: %s *MISMATCH*' % md5) | ||
| 1291 | + warn('\n ** Corrupted ZIP? Delete %s to retry download.\n' % targetfile) | ||
| 1292 | 1292 | return None | |
| 1293 | 1293 | icu_config = { | |
| 1294 | 1294 | 'variables': {} | |
@@ -1432,11 +1432,12 @@ def write_config(data, name): | |||
| 1432 | 1432 | # ICU source dir relative to tools/icu (for .gyp file) | |
| 1433 | 1433 | o['variables']['icu_path'] = icu_full_path | |
| 1434 | 1434 | if not os.path.isdir(icu_full_path): | |
| 1435 | - warn('* ECMA-402 (Intl) support didn\'t find ICU in %s..' % icu_full_path) | ||
| 1436 | 1435 | # can we download (or find) a zipfile? | |
| 1437 | 1436 | localzip = icu_download(icu_full_path) | |
| 1438 | 1437 | if localzip: | |
| 1439 | 1438 | nodedownload.unpack(localzip, icu_parent_path) | |
| 1439 | + else: | ||
| 1440 | + warn('* ECMA-402 (Intl) support didn\'t find ICU in %s..' % icu_full_path) | ||
| 1440 | 1441 | if not os.path.isdir(icu_full_path): | |
| 1441 | 1442 | error('''Cannot build Intl without ICU in %s. | |
| 1442 | 1443 | Fix, or disable with "--with-intl=none"''' % icu_full_path) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,7 @@ | |||
| 1 | 1 | #!/usr/bin/env python | |
| 2 | 2 | # Moved some utilities here from ../../configure | |
| 3 | 3 | ||
| 4 | + from __future__ import print_function | ||
| 4 | 5 | import urllib | |
| 5 | 6 | import hashlib | |
| 6 | 7 | import sys | |
@@ -36,10 +37,13 @@ def retrievefile(url, targetfile): | |||
| 36 | 37 | sys.stdout.write(' <%s>\nConnecting...\r' % url) | |
| 37 | 38 | sys.stdout.flush() | |
| 38 | 39 | ConfigOpener().retrieve(url, targetfile, reporthook=reporthook) | |
| 39 | - print '' # clear the line | ||
| 40 | + print('') # clear the line | ||
| 40 | 41 | return targetfile | |
| 42 | + except IOError as err: | ||
| 43 | + print(' ** IOError %s\n' % err) | ||
| 44 | + return None | ||
| 41 | 45 | except: | |
| 42 | - print ' ** Error occurred while downloading\n <%s>' % url | ||
| 46 | + print(' ** Error occurred while downloading\n <%s>' % url) | ||
| 43 | 47 | raise | |
| 44 | 48 | ||
| 45 | 49 | def md5sum(targetfile): | |
@@ -56,12 +60,12 @@ def unpack(packedfile, parent_path): | |||
| 56 | 60 | """Unpacks packedfile into parent_path. Assumes .zip. Returns parent_path""" | |
| 57 | 61 | if zipfile.is_zipfile(packedfile): | |
| 58 | 62 | with contextlib.closing(zipfile.ZipFile(packedfile, 'r')) as icuzip: | |
| 59 | - print ' Extracting zipfile: %s' % packedfile | ||
| 63 | + print(' Extracting zipfile: %s' % packedfile) | ||
| 60 | 64 | icuzip.extractall(parent_path) | |
| 61 | 65 | return parent_path | |
| 62 | 66 | elif tarfile.is_tarfile(packedfile): | |
| 63 | 67 | with contextlib.closing(tarfile.TarFile.open(packedfile, 'r')) as icuzip: | |
| 64 | - print ' Extracting tarfile: %s' % packedfile | ||
| 68 | + print(' Extracting tarfile: %s' % packedfile) | ||
| 65 | 69 | icuzip.extractall(parent_path) | |
| 66 | 70 | return parent_path | |
| 67 | 71 | else: | |
@@ -112,7 +116,7 @@ def parse(opt): | |||
| 112 | 116 | theRet[anOpt] = True | |
| 113 | 117 | else: | |
| 114 | 118 | # future proof: ignore unknown types | |
| 115 | - print 'Warning: ignoring unknown --download= type "%s"' % anOpt | ||
| 119 | + print('Warning: ignoring unknown --download= type "%s"' % anOpt) | ||
| 116 | 120 | # all done | |
| 117 | 121 | return theRet | |
| 118 | 122 | ||
@@ -122,6 +126,6 @@ def candownload(auto_downloads, package): | |||
| 122 | 126 | if auto_downloads[package]: | |
| 123 | 127 | return True | |
| 124 | 128 | else: | |
| 125 | - print """Warning: Not downloading package "%s". You could pass "--download=all" | ||
| 126 | - (Windows: "download-all") to try auto-downloading it.""" % package | ||
| 129 | + print("""Warning: Not downloading package "%s". You could pass "--download=all" | ||
| 130 | + (Windows: "download-all") to try auto-downloading it.""" % package) | ||
| 127 | 131 | return False | |
| Back | FazBrowse Home | New Git URL |
0 commit comments