1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 01:19:52 +00: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:
Richard Purdie
2016-05-12 08:30:35 +01:00
parent ef1df51651
commit 0f2c59367a
63 changed files with 390 additions and 400 deletions
+1 -1
View File
@@ -527,7 +527,7 @@ def utility_sed(name, args, interp, env, stdin, stdout, stderr, debugflags):
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
# Scan pattern arguments and append a space if necessary
for i in xrange(len(args)):
for i in range(len(args)):
if not RE_SED.search(args[i]):
continue
args[i] = args[i] + ' '
+2 -2
View File
@@ -474,7 +474,7 @@ class Environment:
"""
# Save and remove previous arguments
prevargs = []
for i in xrange(int(self._env['#'])):
for i in range(int(self._env['#'])):
i = str(i+1)
prevargs.append(self._env[i])
del self._env[i]
@@ -488,7 +488,7 @@ class Environment:
return prevargs
def get_positional_args(self):
return [self._env[str(i+1)] for i in xrange(int(self._env['#']))]
return [self._env[str(i+1)] for i in range(int(self._env['#']))]
def get_variables(self):
return dict(self._env)
+1 -1
View File
@@ -20,7 +20,7 @@ except NameError:
from Set import Set as set
from ply import lex
from sherrors import *
from bb.pysh.sherrors import *
class NeedMore(Exception):
pass
+2 -2
View File
@@ -10,11 +10,11 @@
import os.path
import sys
import pyshlex
import bb.pysh.pyshlex as pyshlex
tokens = pyshlex.tokens
from ply import yacc
import sherrors
import bb.pysh.sherrors as sherrors
class IORedirect:
def __init__(self, op, filename, io_number=None):