Author: esr
Date: Wed Feb 27 03:48:23 2008
New Revision: 24106

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24106&view=rev
Log:
Frewall in case of really ill-formed WML.

Modified:
    trunk/data/tools/wmlscope

Modified: trunk/data/tools/wmlscope
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmlscope?rev=24106&r1=24105&r2=24106&view=diff
==============================================================================
--- trunk/data/tools/wmlscope (original)
+++ trunk/data/tools/wmlscope Wed Feb 27 03:48:23 2008
@@ -148,7 +148,10 @@
                 print "%s: macro %s(%s) has mismatches:" % (m, n, ", 
".join(map(lambda x: "%s=%s" % (x, formaltype(x)), m.args)))
                 for (file, refs) in m.references.items():
                     for (ln, args) in refs:
-                        print '"%s", line %d: %s(%s) with signature (%s)' % 
(file, ln, n, ", ".join(args), ", ".join(map(lambda f, a: "%s=%s" % (f, 
actualtype(a)), m.args, args)))
+                        try:
+                            print '"%s", line %d: %s(%s) with signature (%s)' 
% (file, ln, n, ", ".join(args), ", ".join(map(lambda f, a: "%s=%s" % (f, 
actualtype(a)), m.args, args)))
+                        except AttributeError:
+                            print '"%s", line %d: internal error in reporter' 
% (file, ln)
     def typelist(self, branch):
         "Dump actual and formal aruments for macros in specified file"
         already_seen = []


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to