예제 #1
0
def outputOrigin(out, tabs, originTrace):
	for origin in originTrace:
		out << tabs
		if origin: out.begin('a', href="file:%s"%(urllib.pathname2url(origin.filename),))
		out << originString(origin)
		if origin: out.end('a')
		out.endl()
예제 #2
0
	def __init__(self, code, node, reason):
		self.code   = code
		self.node   = node
		self.reason = reason

		trace = '\n'.join([originString(origin) for origin in node.annotation.origin])

		Exception.__init__(self, "\n\n".join([reason, repr(code), trace, repr(node)]))
	def directCall(self, node, code, selfarg, args, vargs, kargs, targets):
		if self.doOnce(node):
			if not code.isCode():
				trace = "\n".join([originString(part) for part in node.annotation.origin])
				assert False, (("Incorrect code parameter %r\n" % code)+trace)
			op   = self.contextOp(node)
			kwds = [] # HACK
			DirectCallConstraint(self.system, op, code, selfarg, args, kwds, vargs, kargs, targets)
		return targets
예제 #4
0
def outputOrigin(out, tabs, originTrace):
    for origin in originTrace:
        out << tabs
        if origin:
            out.begin('a',
                      href="file:%s" %
                      (urllib.pathname2url(origin.filename), ))
        out << originString(origin)
        if origin: out.end('a')
        out.endl()
예제 #5
0
    def __init__(self, code, node, reason):
        self.code = code
        self.node = node
        self.reason = reason

        trace = '\n'.join(
            [originString(origin) for origin in node.annotation.origin])

        Exception.__init__(
            self, "\n\n".join([reason, repr(code), trace,
                               repr(node)]))
예제 #6
0
 def directCall(self, node, code, selfarg, args, vargs, kargs, targets):
     if self.doOnce(node):
         if not code.isCode():
             trace = "\n".join(
                 [originString(part) for part in node.annotation.origin])
             assert False, (("Incorrect code parameter %r\n" % code) +
                            trace)
         op = self.contextOp(node)
         kwds = []  # HACK
         DirectCallConstraint(self.system, op, code, selfarg, args, kwds,
                              vargs, kargs, targets)
     return targets