Author: elias
Date: Mon Jan 11 21:31:34 2010
New Revision: 40669
URL: http://svn.gna.org/viewcvs/wesnoth?rev=40669&view=rev
Log:
[wmlunits] fixed some problems with latin1 filenames
Modified:
branches/1.6/data/tools/unit_tree/helpers.py
branches/1.6/data/tools/wesnoth/wmlparser.py
branches/1.6/data/tools/wmlunits
Modified: branches/1.6/data/tools/unit_tree/helpers.py
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/data/tools/unit_tree/helpers.py?rev=40669&r1=40668&r2=40669&view=diff
==============================================================================
--- branches/1.6/data/tools/unit_tree/helpers.py (original)
+++ branches/1.6/data/tools/unit_tree/helpers.py Mon Jan 11 21:31:34 2010
@@ -142,7 +142,8 @@
p.wait()
else:
sys.stderr.write(
- "Warning: Required image %s: \"%s\" does not exist.\n" %
(c, i))
+ "Warning: Required image %s: \"%s\" does not exist.\n" % (
+ repr(c), repr(i)))
if self.verbose:
sys.stderr.write("Warning: Looked at the following
locations:\n")
sys.stderr.write("\n".join(bases) + "\n")
@@ -355,7 +356,10 @@
except KeyError:
sys.stderr.write(
("Error: Era '%s' faction '%s' references " +
- "non-existant unit id '%s'!\n") % (eid, fid, uid))
+ "non-existant unit id '%s'!\n") % (
+ eid,
+ fid,
+ repr(uid)))
continue
if not eid in unit.eras:
unit.eras.append(eid)
Modified: branches/1.6/data/tools/wesnoth/wmlparser.py
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/data/tools/wesnoth/wmlparser.py?rev=40669&r1=40668&r2=40669&view=diff
==============================================================================
--- branches/1.6/data/tools/wesnoth/wmlparser.py (original)
+++ branches/1.6/data/tools/wesnoth/wmlparser.py Mon Jan 11 21:31:34 2010
@@ -374,10 +374,11 @@
return None
# If it is a directory, parse all cfg files within.
if os.path.isdir(dirpath):
+ # Note: glob.glob will return
# Execute all WML files in the directory.
- files = glob.glob(dirpath + "/*.cfg")
+ files = glob.glob(str(dirpath + "/*.cfg"))
# And also execute directories with a _main.cfg.
- files += glob.glob(dirpath + "/*/_main.cfg")
+ files += glob.glob(str(dirpath + "/*/_main.cfg"))
files.sort()
mc = dirpath + "/_main.cfg"
fc = dirpath + "/_final.cfg"
Modified: branches/1.6/data/tools/wmlunits
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/data/tools/wmlunits?rev=40669&r1=40668&r2=40669&view=diff
==============================================================================
--- branches/1.6/data/tools/wmlunits (original)
+++ branches/1.6/data/tools/wmlunits Mon Jan 11 21:31:34 2010
@@ -111,7 +111,7 @@
except KeyError:
sys.stderr.write(
"Warning: Unit %s not found as advancement of
%s\n" %
- (auid, uid))
+ (auid, repr(uid)))
continue
forest.add_node(helpers.UnitNode(au))
new_units_added[auid] = au
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits