learningequality / kolibri-installer-gnome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kolibri imports are causing KOLIBRI_HOME/db.sqlite3 and others to be created

dylanmccall opened this issue · comments

Imports from Kolibri (presumably from kolibri.utils.logger in globals.py) are causing files inside KOLIBRI_HOME to be created, such as db.sqlite3 and job_storage.sqlite3. These files are empty, but a potential source of trouble.

We should avoid imports from kolibri except where necessary, and work to split out modules we need in a way that they don't trigger a cascade of imports.

@dylanmccall It may be worth raising this issue in the Kolibri issue tracker. Creating files as a side effect of importing certain modules seems like messy behavior to me, especially since right now apps are expected to use Kolibri APIs to register the app plugin, etc. If they're files with no data, in addition, then checks for the existence of those files may lead to false positives for Kolibri installs.

Mhmm, I agree. I was thinking of looking through the tree of imports coming from the timed file logger utility to find what's causing that, and indeed if we can find the offending bits and move them to init() functions or something of the sort that would be the best :)