[wmlunits] Ignore addon unit levels < 0 or > 5.
Ignore addons with unhandled errors.
This commit is contained in:
parent
a28b1a998a
commit
1b105e75ee
2 changed files with 6 additions and 1 deletions
|
@ -236,6 +236,8 @@ class HTMLOutput:
|
|||
nodes.sort(by_name)
|
||||
for node in nodes:
|
||||
level = node.unit.level
|
||||
if level < 0: level = 0
|
||||
if level > 5: level = 5
|
||||
rows[x][level] = (1, node.breadth, node)
|
||||
for i in range(1, node.breadth):
|
||||
rows[x + i][level] = (0, 0, node)
|
||||
|
|
|
@ -10,7 +10,7 @@ Run without arguments to see usage.
|
|||
try: import psyco; psyco.full()
|
||||
except ImportError: pass
|
||||
|
||||
import sys, os, glob, shutil, urllib2, optparse
|
||||
import sys, os, glob, shutil, urllib2, optparse, traceback
|
||||
import subprocess, yaml
|
||||
|
||||
import wesnoth.wmlparser2 as wmlparser2
|
||||
|
@ -309,6 +309,9 @@ def batch_process():
|
|||
ef.write(str(e))
|
||||
ef.close()
|
||||
print(" " + name + " failed")
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
print(" " + name + " failed")
|
||||
finally:
|
||||
if name != "mainline":
|
||||
move(options.config_dir + "/data/add-ons", options.addons, name)
|
||||
|
|
Loading…
Add table
Reference in a new issue