[Freedombox-discuss] Plinth deb packages
Petter Reinholdtsen
pere at hungry.com
Tue Sep 3 18:47:00 UTC 2013
I must say, I am very happy to see more people working on making a deb
based Freedombox setup. :) I look forward to using your debs instead
of running directly from the git cloned directory. :)
[Tzafrir Cohen]
> And when I skip it by force, I get the following error on a login
> attempt (after submitting the login form):
I belive I found a fix for this. The sqlite3 file is opened in single
thread mode, which do not work with the multithreaded plinth
application.
Try this patch:
--- a/withsqlite.py
+++ b/withsqlite.py
@@ -117,7 +117,7 @@ True
def __enter__(self):
if not os.path.exists(self.fname):
self.make_db()
- self.conn = sqlite3.connect(self.fname)
+ self.conn = sqlite3.connect(self.fname, check_same_thread = False)
self.crsr = self.conn.cursor()
self.crsr.execute('''create table if not exists %s (key text unique, val
self.conn.commit()
@@ -126,7 +126,7 @@ True
self.conn.commit()
self.crsr.close()
def make_db(self):
- conn = sqlite3.connect(self.fname)
+ conn = sqlite3.connect(self.fname, check_same_thread = False)
c = conn.cursor()
c.execute('''create table if not exists %s (key text unique, val text)'''
conn.commit()
With this change I place, I could log in using admin/secret and get
the user interface.
--
Happy hacking
Petter Reinholdtsen
More information about the Freedombox-discuss
mailing list