summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRawng <rawng.github@gmail.com>2014-10-05 20:14:05 -0400
committerwushin <pasekei@gmail.com>2014-10-05 22:10:00 -0500
commit35b8c93c78a1695f8c9d584c270adba0e5ad37a5 (patch)
tree5c2aa25b783bf27b326aa418f39bf0b55c9b6c8b
parentb69dd0c31f57da89a930a12c07c878f6fe202cd2 (diff)
downloadmanamarket-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.py5
1 files changed, 1 insertions, 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')