elif os.path.exists(self.db_filename) and not os.path.isfile(self.db_filename):
raise IOError, '%s exists but is not a file. please remove it and try again' \
% self.db_filename
elif os.path.exists(self.db_filename) and not os.path.isfile(self.db_filename):
raise IOError, '%s exists but is not a file. please remove it and try again' \
% self.db_filename