diff options
Diffstat (limited to 'poky/bitbake/lib/ply')
-rw-r--r-- | poky/bitbake/lib/ply/lex.py | 6 | ||||
-rw-r--r-- | poky/bitbake/lib/ply/yacc.py | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/poky/bitbake/lib/ply/lex.py b/poky/bitbake/lib/ply/lex.py index 267ec100f..182f2e837 100644 --- a/poky/bitbake/lib/ply/lex.py +++ b/poky/bitbake/lib/ply/lex.py @@ -705,11 +705,7 @@ class LexerReflect(object): # Sort the functions by line number for f in self.funcsym.values(): - if sys.version_info[0] < 3: - f.sort(lambda x,y: cmp(func_code(x[1]).co_firstlineno,func_code(y[1]).co_firstlineno)) - else: - # Python 3.0 - f.sort(key=lambda x: func_code(x[1]).co_firstlineno) + f.sort(key=lambda x: func_code(x[1]).co_firstlineno) # Sort the strings by regular expression length for s in self.strsym.values(): diff --git a/poky/bitbake/lib/ply/yacc.py b/poky/bitbake/lib/ply/yacc.py index 561784f2f..46e7dc96f 100644 --- a/poky/bitbake/lib/ply/yacc.py +++ b/poky/bitbake/lib/ply/yacc.py @@ -1205,7 +1205,7 @@ class Production(object): # Precompute the list of productions immediately following. Hack. Remove later try: - p.lr_after = Prodnames[p.prod[n+1]] + p.lr_after = self.Prodnames[p.prod[n+1]] except (IndexError,KeyError): p.lr_after = [] try: |