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 ...@@ -4,7 +4,7 @@ from lib2to3.pygram import python_symbols as syms
from lib2to3.pytree import Leaf, Node from lib2to3.pytree import Leaf, Node
import os import os
from my2to3.trace import get_data from my2to3.trace import create_table, get_data
from my2to3.util import add_future, data2types from my2to3.util import add_future, data2types
...@@ -39,7 +39,7 @@ class FixDivisionSupport(BaseFix): ...@@ -39,7 +39,7 @@ class FixDivisionSupport(BaseFix):
def transform(self, node, results): def transform(self, node, results):
filename, lineno, id_ = [l.value for l in node.children[1].children[1].children[:-4:2]] 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: if not data:
return return
......
...@@ -55,7 +55,7 @@ def get_data(table, columns_to_select='*', conditions={}): ...@@ -55,7 +55,7 @@ def get_data(table, columns_to_select='*', conditions={}):
table, table,
) )
if conditions: 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: try:
return c.execute(query).fetchall() return c.execute(query).fetchall()
finally: 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