Author: soliton
Date: Tue Mar 31 03:00:36 2009
New Revision: 34319

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34319&view=rev
Log:
default to level 0 (like wesnoth) also on ValueError

Modified:
    branches/1.6/data/tools/unit_tree/helpers.py   (contents, props changed)

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=34319&r1=34318&r2=34319&view=diff
==============================================================================
--- branches/1.6/data/tools/unit_tree/helpers.py (original)
+++ branches/1.6/data/tools/unit_tree/helpers.py Tue Mar 31 03:00:36 2009
@@ -314,8 +314,10 @@
             try:
                 level = int(self.get_unit_value(unit, "level"))
             except TypeError:
-                level = 5
-            if level < 0: level = 5
+                level = 0
+            except ValueError:
+                level = 0
+            if level < 0: level = 0
             unit.level = level
 
         return len(newunits)

Propchange: branches/1.6/data/tools/unit_tree/helpers.py
------------------------------------------------------------------------------
    svn:executable = *


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to