Commit f5adf0ab authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

fixup! division_support: record the status of each modification

This fixes commit 3817aa59.
parent 0d19c086
......@@ -4,7 +4,7 @@ from lib2to3.pygram import python_symbols as syms
from lib2to3.pytree import Leaf, Node
import os
from my2to3.trace import get_data
from my2to3.trace import create_table, get_data
from my2to3.util import add_future, data2types
......@@ -39,7 +39,7 @@ class FixDivisionSupport(BaseFix):
def transform(self, node, results):
filename, lineno, id_ = [l.value for l in node.children[1].children[1].children[:-4:2]]
data = get_data("division", ["dividend_type", "divisor_type"], dict(filename=filename, lineno=lineno, id=id_))
data = get_data("division_trace", ["dividend_type", "divisor_type"], dict(filename=filename, lineno=lineno, id=id_))
if not data:
return
......
......@@ -55,7 +55,7 @@ def get_data(table, columns_to_select='*', conditions={}):
table,
)
if conditions:
query += "WHERE " + ' AND '.join(k + " = " + v for k, v in conditions.items())
query += " WHERE " + ' AND '.join(k + " = " + v for k, v in conditions.items())
try:
return c.execute(query).fetchall()
finally:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment