mail[Wesnoth-commits] r34320 - /trunk/data/tools/unit_tree/helpers.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by soliton . de on March 31, 2009 - 03:01:
Author: soliton
Date: Tue Mar 31 03:01:44 2009
New Revision: 34320

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

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

Modified: trunk/data/tools/unit_tree/helpers.py
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/unit_tree/helpers.py?rev=34320&r1=34319&r2=34320&view=diff
==============================================================================
--- trunk/data/tools/unit_tree/helpers.py (original)
+++ trunk/data/tools/unit_tree/helpers.py Tue Mar 31 03:01:44 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: trunk/data/tools/unit_tree/helpers.py
------------------------------------------------------------------------------
    svn:executable = *




Related Messages


Powered by MHonArc, Updated Tue Mar 31 03:40:35 2009