]> git.sur5r.net Git - u-boot/blobdiff - test/py/u_boot_spawn.py
Merge git://git.denx.de/u-boot-dm
[u-boot] / test / py / u_boot_spawn.py
index 108498a9a4b7fb9cfd07f3c8c228db26e679dfa0..b011a3e3da255f5301163973bc52f72af9da3a32 100644 (file)
@@ -58,7 +58,7 @@ class Spawn(object):
                     os.chdir(cwd)
                 os.execvp(args[0], args)
             except:
-                print 'CHILD EXECEPTION:'
+                print('CHILD EXECEPTION:')
                 import traceback
                 traceback.print_exc()
             finally:
@@ -134,7 +134,7 @@ class Spawn(object):
             the expected time.
         """
 
-        for pi in xrange(len(patterns)):
+        for pi in range(len(patterns)):
             if type(patterns[pi]) == type(''):
                 patterns[pi] = re.compile(patterns[pi])
 
@@ -143,7 +143,7 @@ class Spawn(object):
             while True:
                 earliest_m = None
                 earliest_pi = None
-                for pi in xrange(len(patterns)):
+                for pi in range(len(patterns)):
                     pattern = patterns[pi]
                     m = pattern.search(self.buf)
                     if not m:
@@ -198,7 +198,7 @@ class Spawn(object):
         """
 
         os.close(self.fd)
-        for i in xrange(100):
+        for i in range(100):
             if not self.isalive():
                 break
             time.sleep(0.1)