Merge "Removing deprecated functions xrange and cmp"
This commit is contained in:
commit
a8c1c24c0f
|
@ -202,7 +202,7 @@ class DetailView(tables.DataTableView):
|
|||
# There could be another table with the same name and different
|
||||
# arity. Divide the rows into unnamed columns. Number them for
|
||||
# internal reference.
|
||||
for i in xrange(0, row_len):
|
||||
for i in range(0, row_len):
|
||||
col_name = str(i)
|
||||
column_names.append(col_name)
|
||||
table_class_attrs[col_name] = tables.Column(
|
||||
|
@ -226,7 +226,7 @@ class DetailView(tables.DataTableView):
|
|||
try:
|
||||
row_data = row['data']
|
||||
row.delete_by_key('data')
|
||||
for i in xrange(0, num_cols):
|
||||
for i in range(0, num_cols):
|
||||
row.set_value(column_names[i], row_data[i])
|
||||
except Exception as e:
|
||||
msg_args = {
|
||||
|
|
|
@ -98,7 +98,9 @@ class CreateConditions(workflows.Step):
|
|||
|
||||
def _compare_mapping_columns(self, x, y):
|
||||
# x = "mapping_column_<int>", y = "mapping_column_<int>"
|
||||
return cmp(int(x.split('_')[-1]), int(y.split('_')[-1]))
|
||||
x = int(x.split('_')[-1])
|
||||
y = int(y.split('_')[-1])
|
||||
return (x > y) - (x < y)
|
||||
|
||||
def render(self):
|
||||
# Overriding parent method to add extra template context variables.
|
||||
|
|
Loading…
Reference in New Issue