[svn r8039] parsing of 2007 logbook. still problems

This commit is contained in:
julian
2008-10-27 03:03:52 +01:00
parent 7dc74cf94c
commit 2f0f92a1f6
4 changed files with 79 additions and 58 deletions

View File

@@ -4,7 +4,11 @@ import settings
import expo.models as models
import csv
import time
<<<<<<< .mine
#import sqlite3
=======
# import sqlite3
>>>>>>> .r8038
import re
import os
@@ -61,8 +65,13 @@ caveReader = csv.reader(cavetab)
caveReader.next() # Strip out column headers
<<<<<<< .mine
def save(x): #There seems to be an intermitent problem with sqlite and Vista, uncomment the lines below and the "import sqlite3" above to fix it
# try:
=======
def save(x): #There seems to be an intermitent problem with sqlite and Vista, uncomment the lines below, and the import sqlite3 statment above to fix it
# try:
>>>>>>> .r8038
x.save()
# except sqlite3.OperationalError:
# print "Error"
@@ -269,4 +278,4 @@ for line in caveReader :
entrance_letter = ''
newCaveAndEntrance = models.CaveAndEntrance(cave = newCave, entrance = newEntrance, entrance_letter = entrance_letter)
save(newCaveAndEntrance)
save(newCaveAndEntrance)