mail[Wesnoth-commits] r34319 - /branches/1.6/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:00:
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 = *




Related Messages


Powered by MHonArc, Updated Tue Mar 31 03:20:26 2009