[U-Boot] [RFC PATCH v2 2/2] tools: make genboardscfg.py compatible with Python 2.5

Masahiro Yamada yamada.m at jp.panasonic.com
Fri Aug 22 08:18:09 CEST 2014


Tom,


A litte more info:


Buildman does not work on python 2.5.
(only 2.6 and 2.7)
No complaint about it so far.

This tools is intended to be a work-around for using
MAKEALL and Buildman, but we are removing the former.

In that case, having only this tool support python 2.5
seems meaningless.


Best Regards
Masahiro Yamada





On Fri, 22 Aug 2014 15:01:30 +0900
Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:

> Tom, 
> 
> 
> I noticed this patch's gone to RFC.
> 
> Did you decide to drop python2.5 from support?
> 
> If so, I will use "except ... as ..." and "with ... as ..."
> statements in my other patches.
> 
> 
> Best Regards
> Masahiro Yamada
> 
> 
> 
> On Mon,  4 Aug 2014 19:23:14 +0900
> Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
> 
> > The statement "exception ... as ..." can be used in Python 2.6
> > or lator. Avoid using it.
> > Tested on Python 2.5.6.
> > 
> > Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
> > ---
> > 
> > Changes in v2:
> >   - Fix git-description.  s/exception/except/
> > 
> >  tools/genboardscfg.py | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py
> > index 734d90b..9e4892f 100755
> > --- a/tools/genboardscfg.py
> > +++ b/tools/genboardscfg.py
> > @@ -57,7 +57,7 @@ def get_terminal_columns():
> >          arg = struct.pack('hhhh', 0, 0, 0, 0)
> >          try:
> >              ret = fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ, arg)
> > -        except IOError as exception:
> > +        except IOError, exception:
> >              if exception.errno != errno.ENOTTY:
> >                  raise
> >              # If 'Inappropriate ioctl for device' error occurs,
> > @@ -473,7 +473,7 @@ def gen_boards_cfg(jobs):
> >          # We should remove incomplete boards.cfg
> >          try:
> >              os.remove(BOARD_FILE)
> > -        except OSError as exception:
> > +        except OSError, exception:
> >              # Ignore 'No such file or directory' error
> >              if exception.errno != errno.ENOENT:
> >                  raise
> > -- 
> > 1.9.1
> 
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot




More information about the U-Boot mailing list