Skip to content
Browse files

Inferno

  • Loading branch information...
1 parent 7ed635f commit eb943092dc0bd14443d8bf10d8633559a2184eab @theatrus committed
Showing with 30,093 additions and 31,270 deletions.
  1. +7 −3 import/import_types.py
  2. +30,086 −31,267 import/types.txt
View
10 import/import_types.py
@@ -24,7 +24,7 @@
csvread = csv.reader(lines)
for fields in csvread:
-
+ print fields
id = long(fields[0])
name = fields[2].strip()
@@ -36,13 +36,17 @@
if volume == 0:
volume = 0.001
+
+ published = "1"
try:
published = int(fields[12])
except:
pass
+
marketgroup = fields[13]
# Skip non-market items
- if marketgroup == "null" or marketgroup == "" or marketgroup == "0.0":
+ if marketgroup == "null" or marketgroup == "" or marketgroup == "0.0" or marketgroup == "0":
+ print "SKIP: ",name,volume,published,marketgroup,id
continue
marketgroup = int(marketgroup)
@@ -61,7 +65,7 @@
cur.execute("INSERT INTO types (typeid, typename, size, published, groupid, marketgroup) VALUES (%s,%s,%s, %s, %s, %s)", [id, name, volume, published, group, marketgroup])
print "Added new type ",id,name
db.commit()
- except:
+ except Exception,e:
db.rollback()
View
61,353 import/types.txt
30,086 additions, 31,267 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit eb94309

Please sign in to comment.
Something went wrong with that request. Please try again.