diff options
author | Rawng <rawng.github@gmail.com> | 2014-10-05 20:14:05 -0400 |
---|---|---|
committer | wushin <pasekei@gmail.com> | 2014-10-05 22:10:00 -0500 |
commit | 35b8c93c78a1695f8c9d584c270adba0e5ad37a5 (patch) | |
tree | 5c2aa25b783bf27b326aa418f39bf0b55c9b6c8b | |
parent | b69dd0c31f57da89a930a12c07c878f6fe202cd2 (diff) | |
download | manamarket-35b8c93c78a1695f8c9d584c270adba0e5ad37a5.tar.gz manamarket-35b8c93c78a1695f8c9d584c270adba0e5ad37a5.tar.bz2 manamarket-35b8c93c78a1695f8c9d584c270adba0e5ad37a5.tar.xz manamarket-35b8c93c78a1695f8c9d584c270adba0e5ad37a5.zip |
Treat weight as an int instead of a string.
-rw-r--r-- | utils.py | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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') |