mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
3991f42ed2
commit
c79d18c4b4
2 changed files with 5 additions and 3 deletions
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
%module libfdt
|
%module libfdt
|
||||||
|
|
||||||
|
%include <stdint.i>
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#define SWIG_FILE_WITH_INIT
|
#define SWIG_FILE_WITH_INIT
|
||||||
#include "libfdt.h"
|
#include "libfdt.h"
|
||||||
|
|
|
@ -1877,10 +1877,10 @@ def main():
|
||||||
if options.build_db:
|
if options.build_db:
|
||||||
with open(CONFIG_DATABASE, 'w') as fd:
|
with open(CONFIG_DATABASE, 'w') as fd:
|
||||||
for defconfig, configs in config_db.iteritems():
|
for defconfig, configs in config_db.iteritems():
|
||||||
print >>fd, '%s' % defconfig
|
fd.write('%s\n' % defconfig)
|
||||||
for config in sorted(configs.keys()):
|
for config in sorted(configs.keys()):
|
||||||
print >>fd, ' %s=%s' % (config, configs[config])
|
fd.write(' %s=%s\n' % (config, configs[config]))
|
||||||
print >>fd
|
fd.write('\n')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue