Code simplifications

This commit is contained in:
Thomas Nagy 2016-05-13 23:20:07 +02:00
parent da5c7d8b5c
commit 62f8b482ab
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
1 changed files with 7 additions and 10 deletions

View File

@ -929,8 +929,6 @@ def add_symlink_as(self, **kw):
return self.add_install_task(**kw) return self.add_install_task(**kw)
class inst(Task.Task): class inst(Task.Task):
color = 'CYAN'
def __str__(self): def __str__(self):
"""Return an empty string to disable the display""" """Return an empty string to disable the display"""
return '' return ''
@ -1177,9 +1175,9 @@ class CleanContext(BuildContext):
if self.bldnode != self.srcnode: if self.bldnode != self.srcnode:
# would lead to a disaster if top == out # would lead to a disaster if top == out
lst=[] lst = []
for e in self.all_envs.values(): for env in self.all_envs.values():
lst.extend(self.root.find_or_declare(f) for f in e[CFG_FILES]) lst.extend(self.root.find_or_declare(f) for f in env[CFG_FILES])
for n in self.bldnode.ant_glob('**/*', excl='.lock* *conf_check_*/** config.log c4che/*', quiet=True): for n in self.bldnode.ant_glob('**/*', excl='.lock* *conf_check_*/** config.log c4che/*', quiet=True):
if n in lst: if n in lst:
continue continue
@ -1221,11 +1219,10 @@ class ListContext(BuildContext):
try: try:
# force the cache initialization # force the cache initialization
self.get_tgen_by_name('') self.get_tgen_by_name('')
except Exception: except Errors.WafError:
pass pass
lst = list(self.task_gen_cache_names.keys())
lst.sort() for k in sorted(self.task_gen_cache_names.keys()):
for k in lst:
Logs.pprint('GREEN', k) Logs.pprint('GREEN', k)
class StepContext(BuildContext): class StepContext(BuildContext):
@ -1249,7 +1246,7 @@ class StepContext(BuildContext):
BuildContext.compile(self) BuildContext.compile(self)
return return
targets = None targets = []
if self.targets and self.targets != '*': if self.targets and self.targets != '*':
targets = self.targets.split(',') targets = self.targets.split(',')