Permalink
Browse files

Asset Listing has commas in the quantity...

  • Loading branch information...
1 parent b901bcb commit dc84fc2c5a788e10dfcf5790d6c188d2f4d489af @sudorandom sudorandom committed Dec 24, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 cargoscanner.py
View
@@ -323,7 +323,7 @@ def _add_type(name, count):
# aiming for the format "2 Cargo Scanner II" and "2x Cargo Scanner II"
try:
count, name = fmt_line.split(' ', 1)
- count = int(count.replace('x', '').strip())
+ count = int(count.replace('x', '').strip().replace(',', ''))
if _add_type(name.strip(), count):
continue
except ValueError:
@@ -341,7 +341,7 @@ def _add_type(name, count):
try:
if 'x' in fmt_line:
item, count = fmt_line.rsplit('x', 1)
- if _add_type(item.strip(), int(count.strip())):
+ if _add_type(item.strip(), int(count.strip().replace(',', ''))):
continue
except ValueError:
pass
@@ -362,7 +362,7 @@ def _add_type(name, count):
try:
if fmt_line.count("\t") > 1:
item, count, _ = fmt_line.split("\t", 2)
- if _add_type(item.strip(), int(count.strip())):
+ if _add_type(item.strip(), int(count.strip().replace(',', ''))):
continue
except ValueError:
pass

0 comments on commit dc84fc2

Please sign in to comment.