diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-13 16:02:54 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-09-11 21:43:58 -0600 |
commit | c79d18c4b40d10c0a95b56e51f4517aca4515364 (patch) | |
tree | 94d5cdeb1e0dec0c5cc30bea2f2c44a421b5847a /tools/moveconfig.py | |
parent | 3991f42ed2e38aff28ba3c24369bfbd90620bea7 (diff) | |
download | u-boot-c79d18c4b40d10c0a95b56e51f4517aca4515364.tar.gz |
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 <judge.packham@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/moveconfig.py')
-rwxr-xr-x | tools/moveconfig.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 8a03850192..6f549a51c1 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() |