If no db entry found then I'll return None.
"""
c = self.cursor
- c.execute("SELECT version"
+ c.execute("SELECT version, fileid"
" FROM local_files"
" WHERE path=?",
(path,))
row = self.cursor.fetchone()
+ print "row = %r" % (row,)
if not row:
return None
else:
return row[0]
def did_upload_file(self, filecap, path, version, mtime, ctime, size):
+ print "_did_upload_file(%r, %r, %r, %r, %r, %r)" % (filecap, path, version, mtime, ctime, size)
now = time.time()
fileid = self.get_or_allocate_fileid_for_cap(filecap)
+ print "fileid = %r" % (fileid,)
try:
self.cursor.execute("INSERT INTO last_upload VALUES (?,?,?)",
(fileid, now, now))