diff --git a/csvdb.py b/csvdb.py index 153f413..c3585f8 100755 --- a/csvdb.py +++ b/csvdb.py @@ -4,11 +4,11 @@ import tools import sqlite3, csv, sys -def makeDB(path=tools.dbpath()): +def makeDB(path=tools.dbpath(), infile='tweets.csv'): try: - infile = open('tweets.csv') + infile = open(infile) except IOError: - raise IOError("Please make sure that the tweets.csv from the Twitter download is located in this directory.") + raise IOError("Unable to read %s." % infile) input = list(csv.reader(infile))