Commit cf77ad03 authored by Robert Bradshaw's avatar Robert Bradshaw

Some fixes to get it to run on 2.3

parent 0e55d5f3
...@@ -57,7 +57,7 @@ def parse_command_line(args): ...@@ -57,7 +57,7 @@ def parse_command_line(args):
if modsplitpt == -1: bad_usage() if modsplitpt == -1: bad_usage()
modulename = fqn[:modsplitpt] modulename = fqn[:modsplitpt]
symbolname = fqn[modsplitpt+1:] symbolname = fqn[modsplitpt+1:]
module = __import__(modulename, fromlist=[symbolname], level=0) module = __import__(modulename, globals(), locals(), [symbolname])
return getattr(module, symbolname) return getattr(module, symbolname)
stagename, factoryname = param.split(":") stagename, factoryname = param.split(":")
......
...@@ -105,7 +105,8 @@ PHASES = [ ...@@ -105,7 +105,8 @@ PHASES = [
class TransformSet(dict): class TransformSet(dict):
def __init__(self): def __init__(self):
self.update([(name, []) for name in PHASES]) for name in PHASES:
self[name] = []
def run(self, name, node, **options): def run(self, name, node, **options):
assert name in self assert name in self
for transform in self[name]: for transform in self[name]:
......
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