bumped network version and main version, lots of test work and some stability improvements
This commit is contained in:
parent
e77d422fc2
commit
572e29f5d5
24 changed files with 243 additions and 33 deletions
|
@ -1,9 +1,8 @@
|
|||
'''
|
||||
Onionr - Private P2P Communication
|
||||
"""Onionr - Private P2P Communication.
|
||||
|
||||
DBCreator, creates sqlite3 databases used by Onionr
|
||||
'''
|
||||
'''
|
||||
DBCreator, creates sqlite3 databases used by Onionr
|
||||
"""
|
||||
"""
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
|
@ -16,7 +15,7 @@
|
|||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
'''
|
||||
"""
|
||||
import sqlite3, os
|
||||
from coredb import dbfiles
|
||||
import filepaths
|
||||
|
|
|
@ -22,13 +22,19 @@ import os, shutil
|
|||
import onionrplugins as plugins
|
||||
import logger
|
||||
import filepaths
|
||||
from utils.readstatic import get_static_dir
|
||||
|
||||
def setup_default_plugins():
|
||||
# Copy default plugins into plugins folder
|
||||
if not os.path.exists(plugins.get_plugins_folder()):
|
||||
if os.path.exists('../static-data/default-plugins/'):
|
||||
names = [f for f in os.listdir("../static-data/default-plugins/")]
|
||||
shutil.copytree('../static-data/default-plugins/', plugins.get_plugins_folder())
|
||||
if os.path.exists(get_static_dir() + '/default-plugins/'):
|
||||
names = [f for f in os.listdir(get_static_dir() + '/default-plugins/')]
|
||||
try:
|
||||
shutil.copytree(
|
||||
get_static_dir() + '/default-plugins/',
|
||||
plugins.get_plugins_folder())
|
||||
except FileExistsError:
|
||||
pass
|
||||
|
||||
# Enable plugins
|
||||
for name in names:
|
||||
|
@ -39,6 +45,8 @@ def setup_default_plugins():
|
|||
if not os.path.exists(plugins.get_plugin_data_folder(name)):
|
||||
try:
|
||||
os.mkdir(plugins.get_plugin_data_folder(name))
|
||||
except FileExistsError:
|
||||
pass
|
||||
except Exception as e:
|
||||
#logger.warn('Error enabling plugin: ' + str(e), terminal=True)
|
||||
plugins.disable(name, stop_event = False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue