Fixed bug that broke recharge powers from file
This commit is contained in:
parent
5a08d943bb
commit
23de097725
|
@ -693,11 +693,12 @@ def combatgroups_from_file(filename):
|
||||||
if var == 'recharge':
|
if var == 'recharge':
|
||||||
recharge = {}
|
recharge = {}
|
||||||
recharge['used'] = False
|
recharge['used'] = False
|
||||||
info = var.split('|')
|
info = value.split('|')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
recharge['name'] = info[0].strip()
|
recharge['name'] = info[0].strip()
|
||||||
recharge['value'] = int(info[1])
|
recharge['value'] = int(info[1])
|
||||||
except ValueError:
|
except (ValueError, IndexError):
|
||||||
print 'Error: Bad syntax in recharge power. Ignoring'
|
print 'Error: Bad syntax in recharge power. Ignoring'
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user