SCons.Util.CLVar: fix __str__ method to flatten tuples + revert "add print to debug travis (temp)"

This commit is contained in:
Artem Pavlenko 2020-01-29 22:10:32 +00:00
parent 65dce899cb
commit 2e78959435
2 changed files with 1 additions and 2 deletions

View file

@ -1032,7 +1032,7 @@ class CLVar(UserList):
def __coerce__(self, other): def __coerce__(self, other):
return (self, CLVar(other)) return (self, CLVar(other))
def __str__(self): def __str__(self):
return ' '.join(self.data) return ' '.join([' '.join(f) if type(f) is tuple else f for f in self.data])
# A dictionary that preserves the order in which items are added. # A dictionary that preserves the order in which items are added.
# Submitted by David Benjamin to ActiveState's Python Cookbook web site: # Submitted by David Benjamin to ActiveState's Python Cookbook web site:

View file

@ -63,7 +63,6 @@ def write_config(env, template_filename, config_filename):
if val is None: if val is None:
return matchobj.group(0) return matchobj.group(0)
else: else:
print(key,":",val)
return 'CONFIG_%s=%s' % (key, escape(str(val))) return 'CONFIG_%s=%s' % (key, escape(str(val)))
config = re.sub(r'^CONFIG_(\w+)=.*', subst, template, flags=re.M) config = re.sub(r'^CONFIG_(\w+)=.*', subst, template, flags=re.M)
config_file.write(config) config_file.write(config)