wmltools: fix wmlscope crash in collection of unresolved macro calls
While testing wmlscope without including data/core, which guarantees lots of "unresolved" references, I got a crash pointing to this line with the traceback: "NameError: global name 'args' is not defined". At first, I thought the crash might have been caused by my splitting out parse_macroref into its own function, several months ago. However, the line is at the wrong indentation level for those "args" to be the variable referenced here. So what "args" might have been intended? After tracking down the commit that added "args=args" to this line, I've concluded that this was simply a mistake. ESR isn't around to ask anymore, but if a macro was never defined, or is not called correctly, what "args" could be relevant?
This commit is contained in:
parent
2d864b5eff
commit
6adc90bcf3
1 changed files with 1 additions and 1 deletions
|
@ -632,7 +632,7 @@ class CrossRef:
|
|||
if len(candidates) > 1:
|
||||
print "%s: more than one definition of %s is visible here (%s)." % (Reference(ns, fn, n), name, "; ".join(candidates))
|
||||
if len(candidates) == 0:
|
||||
self.unresolved.append((name,Reference(ns,fn,n+1,args=args)))
|
||||
self.unresolved.append((name,Reference(ns,fn,n+1)))
|
||||
# Don't be fooled by HTML image references in help strings.
|
||||
if "<img>" in line:
|
||||
continue
|
||||
|
|
Loading…
Add table
Reference in a new issue