Fix waflib/extras/syms.py

This commit is contained in:
Thomas Nagy 2016-05-29 16:58:41 +02:00
parent 5526a71695
commit ae243dd23b
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
3 changed files with 5 additions and 4 deletions

View File

@ -28,7 +28,7 @@ class log_to_file(object):
self.filename = filename
self.is_valid = True
def replace_colors(self, data):
for x in Logs.colors_lst.values():
for x in Logs.colors_lst.values():
if isinstance(x, str):
data = data.replace(x, '')
return data
@ -104,7 +104,6 @@ def exit_cleanup():
shutil.copy(filename, os.path.join(up, 'latest.log'))
except OSError:
# this may fail on windows due to processes spawned
#
pass
atexit.register(exit_cleanup)

View File

@ -41,7 +41,7 @@ class gen_sym(Task):
re_nm=re.compile(r'T\s+(_?'+self.generator.export_symbols_regex+r')\b')
else:
re_nm = re.compile(r'T\s+(' + self.generator.export_symbols_regex + r')\b')
cmd = [self.env.NM[0] or 'nm', '-g', obj.abspath()]
cmd = self.env.NM or ['nm'] + ['-g', obj.abspath()]
syms = re_nm.findall(self.generator.bld.cmd_and_log(cmd, quiet=STDOUT, **kw))
self.outputs[0].write('%r' % syms)

View File

@ -4,7 +4,9 @@
"""
Windows-specific optimizations
This module can help reducing the overhead of listing files on windows (more than 10000 files).
This module can help reducing the overhead of listing files on windows
(more than 10000 files). Python 3.5 already provides the listdir
optimization though.
"""
import os