From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masahiro Yamada Date: Fri, 22 Aug 2014 15:01:30 +0900 Subject: [U-Boot] [RFC PATCH v2 2/2] tools: make genboardscfg.py compatible with Python 2.5 In-Reply-To: <1407147794-32066-3-git-send-email-yamada.m@jp.panasonic.com> References: <1407147794-32066-1-git-send-email-yamada.m@jp.panasonic.com> <1407147794-32066-3-git-send-email-yamada.m@jp.panasonic.com> Message-ID: <20140822150130.A091.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 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 > --- > > 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