Error when initializing modules
I missed this issue when merging in a recent change, to only add services (for the firewall) for modules that have completed setup. Strangely I didn't see this issue at all when testing in vagrant.
When running Plinth out of the source folder, I get this error:
Traceback (most recent call last):
File "./run", line 21, in <module>
plinth.__main__.main()
File "/home/jvalleroy/fbx/plinth/plinth/__main__.py", line 323, in main
module_loader.load_modules()
File "/home/jvalleroy/fbx/plinth/plinth/module_loader.py", line 77, in load_modules
_initialize_module(module_name, modules[module_name])
File "/home/jvalleroy/fbx/plinth/plinth/module_loader.py", line 135, in _initialize_module
init()
File "/home/jvalleroy/fbx/plinth/plinth/modules/privoxy/__init__.py", line 78, in init
if service.is_enabled():
AttributeError: 'NoneType' object has no attribute 'is_enabled'
It's due to these lines in the init() for privoxy (and other modules):
def init():
...
if service.is_enabled():
add_shortcut()