From bc8971d122a02ed823acf0758da267dccc584f98 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 12 May 2016 08:30:35 +0100 Subject: bitbake: bitbake: Convert to python 3 megacommit This needs breaking up into smaller changes. (Bitbake rev: cf51f19aed208a75d38c14cd585d9b9f115e3ba3) Signed-off-by: Richard Purdie --- bitbake/lib/ply/yacc.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bitbake/lib/ply/yacc.py') 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: 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 -- cgit v1.2.3-54-g00ecf