diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 54 | ||||
-rw-r--r-- | bitbake/lib/bb/taskdata.py | 8 | ||||
-rw-r--r-- | bitbake/lib/bb/utils.py | 10 |
4 files changed, 37 insertions, 37 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 33b9201e6f..2e139558bc 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -291,7 +291,7 @@ class BBCooker: | |||
291 | depend_tree["rdepends-pkg"] = {} | 291 | depend_tree["rdepends-pkg"] = {} |
292 | depend_tree["rrecs-pkg"] = {} | 292 | depend_tree["rrecs-pkg"] = {} |
293 | 293 | ||
294 | for task in range(len(rq.rqdata.runq_fnid)): | 294 | for task in xrange(len(rq.rqdata.runq_fnid)): |
295 | taskname = rq.rqdata.runq_task[task] | 295 | taskname = rq.rqdata.runq_task[task] |
296 | fnid = rq.rqdata.runq_fnid[task] | 296 | fnid = rq.rqdata.runq_fnid[task] |
297 | fn = taskdata.fn_index[fnid] | 297 | fn = taskdata.fn_index[fnid] |
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 2b81540a14..a80feb9504 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -233,7 +233,7 @@ class RunQueueData: | |||
233 | return "%s, %s" % (fn, taskname) | 233 | return "%s, %s" % (fn, taskname) |
234 | 234 | ||
235 | def get_task_id(self, fnid, taskname): | 235 | def get_task_id(self, fnid, taskname): |
236 | for listid in range(len(self.runq_fnid)): | 236 | for listid in xrange(len(self.runq_fnid)): |
237 | if self.runq_fnid[listid] == fnid and self.runq_task[listid] == taskname: | 237 | if self.runq_fnid[listid] == fnid and self.runq_task[listid] == taskname: |
238 | return listid | 238 | return listid |
239 | return None | 239 | return None |
@@ -255,7 +255,7 @@ class RunQueueData: | |||
255 | """ | 255 | """ |
256 | lowest = 0 | 256 | lowest = 0 |
257 | new_chain = [] | 257 | new_chain = [] |
258 | for entry in range(len(chain)): | 258 | for entry in xrange(len(chain)): |
259 | if chain[entry] < chain[lowest]: | 259 | if chain[entry] < chain[lowest]: |
260 | lowest = entry | 260 | lowest = entry |
261 | new_chain.extend(chain[lowest:]) | 261 | new_chain.extend(chain[lowest:]) |
@@ -268,7 +268,7 @@ class RunQueueData: | |||
268 | """ | 268 | """ |
269 | if len(chain1) != len(chain2): | 269 | if len(chain1) != len(chain2): |
270 | return False | 270 | return False |
271 | for index in range(len(chain1)): | 271 | for index in xrange(len(chain1)): |
272 | if chain1[index] != chain2[index]: | 272 | if chain1[index] != chain2[index]: |
273 | return False | 273 | return False |
274 | return True | 274 | return True |
@@ -339,7 +339,7 @@ class RunQueueData: | |||
339 | deps_left = [] | 339 | deps_left = [] |
340 | task_done = [] | 340 | task_done = [] |
341 | 341 | ||
342 | for listid in range(numTasks): | 342 | for listid in xrange(numTasks): |
343 | task_done.append(False) | 343 | task_done.append(False) |
344 | weight.append(0) | 344 | weight.append(0) |
345 | deps_left.append(len(self.runq_revdeps[listid])) | 345 | deps_left.append(len(self.runq_revdeps[listid])) |
@@ -363,7 +363,7 @@ class RunQueueData: | |||
363 | 363 | ||
364 | # Circular dependency sanity check | 364 | # Circular dependency sanity check |
365 | problem_tasks = [] | 365 | problem_tasks = [] |
366 | for task in range(numTasks): | 366 | for task in xrange(numTasks): |
367 | if task_done[task] is False or deps_left[task] != 0: | 367 | if task_done[task] is False or deps_left[task] != 0: |
368 | problem_tasks.append(task) | 368 | problem_tasks.append(task) |
369 | logger.debug(2, "Task %s (%s) is not buildable\n", task, self.get_user_idstring(task)) | 369 | logger.debug(2, "Task %s (%s) is not buildable\n", task, self.get_user_idstring(task)) |
@@ -441,7 +441,7 @@ class RunQueueData: | |||
441 | if taskid is not None: | 441 | if taskid is not None: |
442 | depends.append(taskid) | 442 | depends.append(taskid) |
443 | 443 | ||
444 | for task in range(len(taskData.tasks_name)): | 444 | for task in xrange(len(taskData.tasks_name)): |
445 | depends = [] | 445 | depends = [] |
446 | recrdepends = [] | 446 | recrdepends = [] |
447 | fnid = taskData.tasks_fnid[task] | 447 | fnid = taskData.tasks_fnid[task] |
@@ -532,7 +532,7 @@ class RunQueueData: | |||
532 | # Algorithm is O(tasks) + O(tasks)*O(fnids) | 532 | # Algorithm is O(tasks) + O(tasks)*O(fnids) |
533 | # | 533 | # |
534 | reccumdepends = {} | 534 | reccumdepends = {} |
535 | for task in range(len(self.runq_fnid)): | 535 | for task in xrange(len(self.runq_fnid)): |
536 | fnid = self.runq_fnid[task] | 536 | fnid = self.runq_fnid[task] |
537 | if fnid not in reccumdepends: | 537 | if fnid not in reccumdepends: |
538 | if fnid in tdepends_fnid: | 538 | if fnid in tdepends_fnid: |
@@ -540,7 +540,7 @@ class RunQueueData: | |||
540 | else: | 540 | else: |
541 | reccumdepends[fnid] = set() | 541 | reccumdepends[fnid] = set() |
542 | reccumdepends[fnid].update(self.runq_depends[task]) | 542 | reccumdepends[fnid].update(self.runq_depends[task]) |
543 | for task in range(len(self.runq_fnid)): | 543 | for task in xrange(len(self.runq_fnid)): |
544 | taskfnid = self.runq_fnid[task] | 544 | taskfnid = self.runq_fnid[task] |
545 | for fnid in reccumdepends: | 545 | for fnid in reccumdepends: |
546 | if task in reccumdepends[fnid]: | 546 | if task in reccumdepends[fnid]: |
@@ -553,7 +553,7 @@ class RunQueueData: | |||
553 | # | 553 | # |
554 | # e.g. do_sometask[recrdeptask] = "do_someothertask" | 554 | # e.g. do_sometask[recrdeptask] = "do_someothertask" |
555 | # (makes sure sometask runs after someothertask of all DEPENDS, RDEPENDS and intertask dependencies, recursively) | 555 | # (makes sure sometask runs after someothertask of all DEPENDS, RDEPENDS and intertask dependencies, recursively) |
556 | for task in range(len(self.runq_fnid)): | 556 | for task in xrange(len(self.runq_fnid)): |
557 | if len(runq_recrdepends[task]) > 0: | 557 | if len(runq_recrdepends[task]) > 0: |
558 | taskfnid = self.runq_fnid[task] | 558 | taskfnid = self.runq_fnid[task] |
559 | for dep in reccumdepends[taskfnid]: | 559 | for dep in reccumdepends[taskfnid]: |
@@ -622,7 +622,7 @@ class RunQueueData: | |||
622 | 622 | ||
623 | maps = [] | 623 | maps = [] |
624 | delcount = 0 | 624 | delcount = 0 |
625 | for listid in range(len(self.runq_fnid)): | 625 | for listid in xrange(len(self.runq_fnid)): |
626 | if runq_build[listid-delcount] == 1: | 626 | if runq_build[listid-delcount] == 1: |
627 | maps.append(listid-delcount) | 627 | maps.append(listid-delcount) |
628 | else: | 628 | else: |
@@ -650,7 +650,7 @@ class RunQueueData: | |||
650 | 650 | ||
651 | # Remap the dependencies to account for the deleted tasks | 651 | # Remap the dependencies to account for the deleted tasks |
652 | # Check we didn't delete a task we depend on | 652 | # Check we didn't delete a task we depend on |
653 | for listid in range(len(self.runq_fnid)): | 653 | for listid in xrange(len(self.runq_fnid)): |
654 | newdeps = [] | 654 | newdeps = [] |
655 | origdeps = self.runq_depends[listid] | 655 | origdeps = self.runq_depends[listid] |
656 | for origdep in origdeps: | 656 | for origdep in origdeps: |
@@ -662,14 +662,14 @@ class RunQueueData: | |||
662 | logger.verbose("Assign Weightings") | 662 | logger.verbose("Assign Weightings") |
663 | 663 | ||
664 | # Generate a list of reverse dependencies to ease future calculations | 664 | # Generate a list of reverse dependencies to ease future calculations |
665 | for listid in range(len(self.runq_fnid)): | 665 | for listid in xrange(len(self.runq_fnid)): |
666 | for dep in self.runq_depends[listid]: | 666 | for dep in self.runq_depends[listid]: |
667 | self.runq_revdeps[dep].add(listid) | 667 | self.runq_revdeps[dep].add(listid) |
668 | 668 | ||
669 | # Identify tasks at the end of dependency chains | 669 | # Identify tasks at the end of dependency chains |
670 | # Error on circular dependency loops (length two) | 670 | # Error on circular dependency loops (length two) |
671 | endpoints = [] | 671 | endpoints = [] |
672 | for listid in range(len(self.runq_fnid)): | 672 | for listid in xrange(len(self.runq_fnid)): |
673 | revdeps = self.runq_revdeps[listid] | 673 | revdeps = self.runq_revdeps[listid] |
674 | if len(revdeps) == 0: | 674 | if len(revdeps) == 0: |
675 | endpoints.append(listid) | 675 | endpoints.append(listid) |
@@ -687,7 +687,7 @@ class RunQueueData: | |||
687 | # Sanity Check - Check for multiple tasks building the same provider | 687 | # Sanity Check - Check for multiple tasks building the same provider |
688 | prov_list = {} | 688 | prov_list = {} |
689 | seen_fn = [] | 689 | seen_fn = [] |
690 | for task in range(len(self.runq_fnid)): | 690 | for task in xrange(len(self.runq_fnid)): |
691 | fn = taskData.fn_index[self.runq_fnid[task]] | 691 | fn = taskData.fn_index[self.runq_fnid[task]] |
692 | if fn in seen_fn: | 692 | if fn in seen_fn: |
693 | continue | 693 | continue |
@@ -1191,7 +1191,7 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
1191 | self.stats = RunQueueStats(len(self.rqdata.runq_fnid)) | 1191 | self.stats = RunQueueStats(len(self.rqdata.runq_fnid)) |
1192 | 1192 | ||
1193 | # Mark initial buildable tasks | 1193 | # Mark initial buildable tasks |
1194 | for task in range(self.stats.total): | 1194 | for task in xrange(self.stats.total): |
1195 | self.runq_running.append(0) | 1195 | self.runq_running.append(0) |
1196 | self.runq_complete.append(0) | 1196 | self.runq_complete.append(0) |
1197 | if len(self.rqdata.runq_depends[task]) == 0: | 1197 | if len(self.rqdata.runq_depends[task]) == 0: |
@@ -1204,7 +1204,7 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
1204 | found = True | 1204 | found = True |
1205 | while found: | 1205 | while found: |
1206 | found = False | 1206 | found = False |
1207 | for task in range(self.stats.total): | 1207 | for task in xrange(self.stats.total): |
1208 | if task in self.rq.scenequeue_covered: | 1208 | if task in self.rq.scenequeue_covered: |
1209 | continue | 1209 | continue |
1210 | if len(self.rqdata.runq_revdeps[task]) > 0 and self.rqdata.runq_revdeps[task].issubset(self.rq.scenequeue_covered): | 1210 | if len(self.rqdata.runq_revdeps[task]) > 0 and self.rqdata.runq_revdeps[task].issubset(self.rq.scenequeue_covered): |
@@ -1333,7 +1333,7 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
1333 | return True | 1333 | return True |
1334 | 1334 | ||
1335 | # Sanity Checks | 1335 | # Sanity Checks |
1336 | for task in range(self.stats.total): | 1336 | for task in xrange(self.stats.total): |
1337 | if self.runq_buildable[task] == 0: | 1337 | if self.runq_buildable[task] == 0: |
1338 | logger.error("Task %s never buildable!" % task) | 1338 | logger.error("Task %s never buildable!" % task) |
1339 | if self.runq_running[task] == 0: | 1339 | if self.runq_running[task] == 0: |
@@ -1368,12 +1368,12 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
1368 | # therefore aims to collapse the huge runqueue dependency tree into a smaller one | 1368 | # therefore aims to collapse the huge runqueue dependency tree into a smaller one |
1369 | # only containing the setscene functions. | 1369 | # only containing the setscene functions. |
1370 | 1370 | ||
1371 | for task in range(self.stats.total): | 1371 | for task in xrange(self.stats.total): |
1372 | self.runq_running.append(0) | 1372 | self.runq_running.append(0) |
1373 | self.runq_complete.append(0) | 1373 | self.runq_complete.append(0) |
1374 | self.runq_buildable.append(0) | 1374 | self.runq_buildable.append(0) |
1375 | 1375 | ||
1376 | for task in range(len(self.rqdata.runq_fnid)): | 1376 | for task in xrange(len(self.rqdata.runq_fnid)): |
1377 | sq_revdeps.append(copy.copy(self.rqdata.runq_revdeps[task])) | 1377 | sq_revdeps.append(copy.copy(self.rqdata.runq_revdeps[task])) |
1378 | sq_revdeps_new.append(set()) | 1378 | sq_revdeps_new.append(set()) |
1379 | if (len(self.rqdata.runq_revdeps[task]) == 0) and task not in self.rqdata.runq_setscene: | 1379 | if (len(self.rqdata.runq_revdeps[task]) == 0) and task not in self.rqdata.runq_setscene: |
@@ -1404,7 +1404,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
1404 | 1404 | ||
1405 | process_endpoints(endpoints) | 1405 | process_endpoints(endpoints) |
1406 | 1406 | ||
1407 | for task in range(len(self.rqdata.runq_fnid)): | 1407 | for task in xrange(len(self.rqdata.runq_fnid)): |
1408 | if task in self.rqdata.runq_setscene: | 1408 | if task in self.rqdata.runq_setscene: |
1409 | deps = set() | 1409 | deps = set() |
1410 | for dep in sq_revdeps_new[task]: | 1410 | for dep in sq_revdeps_new[task]: |
@@ -1413,20 +1413,20 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
1413 | elif len(sq_revdeps_new[task]) != 0: | 1413 | elif len(sq_revdeps_new[task]) != 0: |
1414 | bb.msg.fatal(bb.msg.domain.RunQueue, "Something went badly wrong during scenequeue generation, aborting. Please report this problem.") | 1414 | bb.msg.fatal(bb.msg.domain.RunQueue, "Something went badly wrong during scenequeue generation, aborting. Please report this problem.") |
1415 | 1415 | ||
1416 | #for task in range(len(sq_revdeps_squash)): | 1416 | #for task in xrange(len(sq_revdeps_squash)): |
1417 | # print "Task %s: %s.%s is %s " % (task, self.taskData.fn_index[self.runq_fnid[self.runq_setscene[task]]], self.runq_task[self.runq_setscene[task]] + "_setscene", sq_revdeps_squash[task]) | 1417 | # print "Task %s: %s.%s is %s " % (task, self.taskData.fn_index[self.runq_fnid[self.runq_setscene[task]]], self.runq_task[self.runq_setscene[task]] + "_setscene", sq_revdeps_squash[task]) |
1418 | 1418 | ||
1419 | self.sq_deps = [] | 1419 | self.sq_deps = [] |
1420 | self.sq_revdeps = sq_revdeps_squash | 1420 | self.sq_revdeps = sq_revdeps_squash |
1421 | self.sq_revdeps2 = copy.deepcopy(self.sq_revdeps) | 1421 | self.sq_revdeps2 = copy.deepcopy(self.sq_revdeps) |
1422 | 1422 | ||
1423 | for task in range(len(self.sq_revdeps)): | 1423 | for task in xrange(len(self.sq_revdeps)): |
1424 | self.sq_deps.append(set()) | 1424 | self.sq_deps.append(set()) |
1425 | for task in range(len(self.sq_revdeps)): | 1425 | for task in xrange(len(self.sq_revdeps)): |
1426 | for dep in self.sq_revdeps[task]: | 1426 | for dep in self.sq_revdeps[task]: |
1427 | self.sq_deps[dep].add(task) | 1427 | self.sq_deps[dep].add(task) |
1428 | 1428 | ||
1429 | for task in range(len(self.sq_revdeps)): | 1429 | for task in xrange(len(self.sq_revdeps)): |
1430 | if len(self.sq_revdeps[task]) == 0: | 1430 | if len(self.sq_revdeps[task]) == 0: |
1431 | self.runq_buildable[task] = 1 | 1431 | self.runq_buildable[task] = 1 |
1432 | 1432 | ||
@@ -1437,7 +1437,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
1437 | sq_taskname = [] | 1437 | sq_taskname = [] |
1438 | sq_task = [] | 1438 | sq_task = [] |
1439 | noexec = [] | 1439 | noexec = [] |
1440 | for task in range(len(self.sq_revdeps)): | 1440 | for task in xrange(len(self.sq_revdeps)): |
1441 | realtask = self.rqdata.runq_setscene[task] | 1441 | realtask = self.rqdata.runq_setscene[task] |
1442 | fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[realtask]] | 1442 | fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[realtask]] |
1443 | taskname = self.rqdata.runq_task[realtask] | 1443 | taskname = self.rqdata.runq_task[realtask] |
@@ -1460,7 +1460,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
1460 | for v in valid: | 1460 | for v in valid: |
1461 | valid_new.append(sq_task[v]) | 1461 | valid_new.append(sq_task[v]) |
1462 | 1462 | ||
1463 | for task in range(len(self.sq_revdeps)): | 1463 | for task in xrange(len(self.sq_revdeps)): |
1464 | if task not in valid_new and task not in noexec: | 1464 | if task not in valid_new and task not in noexec: |
1465 | logger.debug(2, "No package found so skipping setscene task %s" % (self.rqdata.get_user_idstring(self.rqdata.runq_setscene[task]))) | 1465 | logger.debug(2, "No package found so skipping setscene task %s" % (self.rqdata.get_user_idstring(self.rqdata.runq_setscene[task]))) |
1466 | self.task_failoutright(task) | 1466 | self.task_failoutright(task) |
@@ -1525,7 +1525,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
1525 | task = None | 1525 | task = None |
1526 | if self.stats.active < self.number_tasks: | 1526 | if self.stats.active < self.number_tasks: |
1527 | # Find the next setscene to run | 1527 | # Find the next setscene to run |
1528 | for nexttask in range(self.stats.total): | 1528 | for nexttask in xrange(self.stats.total): |
1529 | if self.runq_buildable[nexttask] == 1 and self.runq_running[nexttask] != 1: | 1529 | if self.runq_buildable[nexttask] == 1 and self.runq_running[nexttask] != 1: |
1530 | #bb.note("Comparing %s to %s" % (self.sq_revdeps[nexttask], self.scenequeue_covered)) | 1530 | #bb.note("Comparing %s to %s" % (self.sq_revdeps[nexttask], self.scenequeue_covered)) |
1531 | #if len(self.sq_revdeps[nexttask]) > 0 and self.sq_revdeps[nexttask].issubset(self.scenequeue_covered): | 1531 | #if len(self.sq_revdeps[nexttask]) > 0 and self.sq_revdeps[nexttask].issubset(self.scenequeue_covered): |
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py index dc8d0668c1..fdd55ee83e 100644 --- a/bitbake/lib/bb/taskdata.py +++ b/bitbake/lib/bb/taskdata.py | |||
@@ -493,7 +493,7 @@ class TaskData: | |||
493 | dependees = self.get_dependees(targetid) | 493 | dependees = self.get_dependees(targetid) |
494 | for fnid in dependees: | 494 | for fnid in dependees: |
495 | self.fail_fnid(fnid, missing_list) | 495 | self.fail_fnid(fnid, missing_list) |
496 | for taskid in range(len(self.tasks_idepends)): | 496 | for taskid in xrange(len(self.tasks_idepends)): |
497 | idepends = self.tasks_idepends[taskid] | 497 | idepends = self.tasks_idepends[taskid] |
498 | for (idependid, idependtask) in idepends: | 498 | for (idependid, idependtask) in idepends: |
499 | if idependid == targetid: | 499 | if idependid == targetid: |
@@ -558,7 +558,7 @@ class TaskData: | |||
558 | logger.debug(3, ", ".join(self.run_names_index)) | 558 | logger.debug(3, ", ".join(self.run_names_index)) |
559 | 559 | ||
560 | logger.debug(3, "build_targets:") | 560 | logger.debug(3, "build_targets:") |
561 | for buildid in range(len(self.build_names_index)): | 561 | for buildid in xrange(len(self.build_names_index)): |
562 | target = self.build_names_index[buildid] | 562 | target = self.build_names_index[buildid] |
563 | targets = "None" | 563 | targets = "None" |
564 | if buildid in self.build_targets: | 564 | if buildid in self.build_targets: |
@@ -566,7 +566,7 @@ class TaskData: | |||
566 | logger.debug(3, " (%s)%s: %s", buildid, target, targets) | 566 | logger.debug(3, " (%s)%s: %s", buildid, target, targets) |
567 | 567 | ||
568 | logger.debug(3, "run_targets:") | 568 | logger.debug(3, "run_targets:") |
569 | for runid in range(len(self.run_names_index)): | 569 | for runid in xrange(len(self.run_names_index)): |
570 | target = self.run_names_index[runid] | 570 | target = self.run_names_index[runid] |
571 | targets = "None" | 571 | targets = "None" |
572 | if runid in self.run_targets: | 572 | if runid in self.run_targets: |
@@ -574,7 +574,7 @@ class TaskData: | |||
574 | logger.debug(3, " (%s)%s: %s", runid, target, targets) | 574 | logger.debug(3, " (%s)%s: %s", runid, target, targets) |
575 | 575 | ||
576 | logger.debug(3, "tasks:") | 576 | logger.debug(3, "tasks:") |
577 | for task in range(len(self.tasks_name)): | 577 | for task in xrange(len(self.tasks_name)): |
578 | logger.debug(3, " (%s)%s - %s: %s", | 578 | logger.debug(3, " (%s)%s - %s: %s", |
579 | task, | 579 | task, |
580 | self.fn_index[self.tasks_fnid[task]], | 580 | self.fn_index[self.tasks_fnid[task]], |
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index f5336dda60..4208c79343 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -194,10 +194,10 @@ def vercmp_string(val1, val2): | |||
194 | val2 = val2[0].split('.') | 194 | val2 = val2[0].split('.') |
195 | 195 | ||
196 | # add back decimal point so that .03 does not become "3" ! | 196 | # add back decimal point so that .03 does not become "3" ! |
197 | for x in range(1, len(val1)): | 197 | for x in xrange(1, len(val1)): |
198 | if val1[x][0] == '0' : | 198 | if val1[x][0] == '0' : |
199 | val1[x] = '.' + val1[x] | 199 | val1[x] = '.' + val1[x] |
200 | for x in range(1, len(val2)): | 200 | for x in xrange(1, len(val2)): |
201 | if val2[x][0] == '0' : | 201 | if val2[x][0] == '0' : |
202 | val2[x] = '.' + val2[x] | 202 | val2[x] = '.' + val2[x] |
203 | 203 | ||
@@ -214,10 +214,10 @@ def vercmp_string(val1, val2): | |||
214 | val2[-1] += '_' + val2_prepart | 214 | val2[-1] += '_' + val2_prepart |
215 | # The above code will extend version numbers out so they | 215 | # The above code will extend version numbers out so they |
216 | # have the same number of digits. | 216 | # have the same number of digits. |
217 | for x in range(0, len(val1)): | 217 | for x in xrange(0, len(val1)): |
218 | cmp1 = relparse(val1[x]) | 218 | cmp1 = relparse(val1[x]) |
219 | cmp2 = relparse(val2[x]) | 219 | cmp2 = relparse(val2[x]) |
220 | for y in range(0, 3): | 220 | for y in xrange(0, 3): |
221 | myret = cmp1[y] - cmp2[y] | 221 | myret = cmp1[y] - cmp2[y] |
222 | if myret != 0: | 222 | if myret != 0: |
223 | __vercmp_cache__[valkey] = myret | 223 | __vercmp_cache__[valkey] = myret |
@@ -308,7 +308,7 @@ def _print_trace(body, line): | |||
308 | # print the environment of the method | 308 | # print the environment of the method |
309 | min_line = max(1, line-4) | 309 | min_line = max(1, line-4) |
310 | max_line = min(line + 4, len(body)) | 310 | max_line = min(line + 4, len(body)) |
311 | for i in range(min_line, max_line + 1): | 311 | for i in xrange(min_line, max_line + 1): |
312 | if line == i: | 312 | if line == i: |
313 | logger.error(" *** %.4d:%s" % (i, body[i-1]) ) | 313 | logger.error(" *** %.4d:%s" % (i, body[i-1]) ) |
314 | else: | 314 | else: |