From 35b8c93c78a1695f8c9d584c270adba0e5ad37a5 Mon Sep 17 00:00:00 2001 From: Rawng Date: Sun, 5 Oct 2014 20:14:05 -0400 Subject: Treat weight as an int instead of a string. --- utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/utils.py b/utils.py index fb0be37..52d51b6 100644 --- a/utils.py +++ b/utils.py @@ -61,10 +61,7 @@ class ItemDB: for item3 in file3.getroot(): item_struct = Item() item_struct.name = item3.get('name') - if item3.get('weight'): - item_struct.weight = item3.get('weight') - else: - item_struct.weight = 0 + item_struct.weight = int(item3.get('weight', 0)) if item3.get('type'): item_struct.type = item3.get('type') item_struct.description = item3.get('description') -- cgit v1.2.3-60-g2f50