[wmlunits] fixed error message encoding (ported from 1.8 branch)
This commit is contained in:
parent
79e3371fd9
commit
e3f1a8a434
1 changed files with 4 additions and 1 deletions
|
@ -245,7 +245,10 @@ class WesnothList:
|
|||
{~add-ons}
|
||||
""")
|
||||
except wmlparser.Error, e:
|
||||
print e
|
||||
try:
|
||||
print(e)
|
||||
except UnicodeEncodeError:
|
||||
print(e.text.encode("utf8", "ignore"))
|
||||
return n
|
||||
for campaign in WML.find_all("campaign"):
|
||||
cid = self.add_campaign(campaign)
|
||||
|
|
Loading…
Add table
Reference in a new issue