From c79d18c4b40d10c0a95b56e51f4517aca4515364 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 13 Aug 2017 16:02:54 -0600 Subject: moveconfig: Use fd.write() instead of print >> Adjust this code so that it can work with Python 2 and 3. Fixes: d73fcb1 (moveconfig: Support building a simple config database) Reported-by: Chris Packham Signed-off-by: Simon Glass --- tools/moveconfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/moveconfig.py') diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 8a038501929..6f549a51c16 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -1877,10 +1877,10 @@ def main(): if options.build_db: with open(CONFIG_DATABASE, 'w') as fd: for defconfig, configs in config_db.iteritems(): - print >>fd, '%s' % defconfig + fd.write('%s\n' % defconfig) for config in sorted(configs.keys()): - print >>fd, ' %s=%s' % (config, configs[config]) - print >>fd + fd.write(' %s=%s\n' % (config, configs[config])) + fd.write('\n') if __name__ == '__main__': main() -- cgit