]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/db.py
Set timestamp for the downloaded book
[m_librarian.git] / m_librarian / db.py
index f65569cb6e37183922b4dc6ae4e88a51e5bfec00..8786a461b8c69e4dd6fcfd032abce9054e5d7ddc 100755 (executable)
@@ -142,6 +142,9 @@ def open_db(db_uri=None):
         except:
             db_uri = find_sqlite_dburi()
 
+    if '://' not in db_uri:
+        db_uri = 'sqlite://' + os.path.abspath(db_uri).replace(os.sep, '/')
+
     sqlhub.processConnection = connection = connectionForURI(db_uri)
 
     if connection.dbName == 'sqlite':