Ignore campaigns with no extra units.

This commit is contained in:
Elias Pschernig 2008-03-31 17:56:54 +00:00
parent dae7d2f3ec
commit e830b1cccb

View file

@ -64,6 +64,9 @@ class UnitList:
"#define %s\n#enddef\n%s" % (define, text_to_parse))
# This time, it oughta work.
units = WML.get_first("+units")
if not units:
# This campaign has no units. Nothing to do.
return
newunits = units.get_all("unit_type")
self.units_by_campaign[campaign] = []