mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 09:49:33 +02:00
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>
This commit is contained in:
@@ -195,6 +195,8 @@ class YaccProduction:
|
||||
self.lexer = None
|
||||
self.parser= None
|
||||
def __getitem__(self,n):
|
||||
if isinstance(n,slice):
|
||||
return [self[i] for i in range(*(n.indices(len(self.slice))))]
|
||||
if n >= 0: return self.slice[n].value
|
||||
else: return self.stack[n].value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user