diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-12 08:30:35 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-02 08:24:02 +0100 |
commit | 0f2c59367a649de5f57acdccfb4f1fdba9cde730 (patch) | |
tree | 7a3558a3e08e690fbb0b5bdc4044316f9ab4bbcb /bitbake/lib/ply | |
parent | ef1df516512587ad415f76a9626620992d660e45 (diff) | |
download | poky-0f2c59367a649de5f57acdccfb4f1fdba9cde730.tar.gz |
bitbake: bitbake: Convert to python 3
Various misc changes to convert bitbake to python3 which don't warrant
separation into separate commits.
(Bitbake rev: d0f904d407f57998419bd9c305ce53e5eaa36b24)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/ply')
-rw-r--r-- | bitbake/lib/ply/yacc.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/ply/yacc.py b/bitbake/lib/ply/yacc.py index 6168fd9a03..d50886ed2f 100644 --- a/bitbake/lib/ply/yacc.py +++ b/bitbake/lib/ply/yacc.py | |||
@@ -195,6 +195,8 @@ class YaccProduction: | |||
195 | self.lexer = None | 195 | self.lexer = None |
196 | self.parser= None | 196 | self.parser= None |
197 | def __getitem__(self,n): | 197 | def __getitem__(self,n): |
198 | if isinstance(n,slice): | ||
199 | return [self[i] for i in range(*(n.indices(len(self.slice))))] | ||
198 | if n >= 0: return self.slice[n].value | 200 | if n >= 0: return self.slice[n].value |
199 | else: return self.stack[n].value | 201 | else: return self.stack[n].value |
200 | 202 | ||