Better config handling & better output for serverjar

Changes:
- better config handling
- better output for serverjar checking
This commit is contained in:
Neocky
2021-03-27 12:07:19 +01:00
parent 17611c741e
commit fddc0c252c
9 changed files with 100 additions and 127 deletions

View File

@@ -6,7 +6,7 @@ import requests
from pathlib import Path
from utils.consoleoutput import oColors
from handlers.handle_config import checkConfig, configurationValues
from handlers.handle_config import configurationValues
from handlers.handle_sftp import createSFTPConnection
@@ -95,11 +95,12 @@ def getCommandHelp(optionalParams):
def check_local_plugin_folder():
if checkConfig().localPluginFolder:
if checkConfig().seperateDownloadPath:
pluginFolderPath = checkConfig().pathToSeperateDownloadPath
configValues = configurationValues()
if configValues.localPluginFolder:
if configValues.seperateDownloadPath:
pluginFolderPath = configValues.pathToSeperateDownloadPath
else:
pluginFolderPath = checkConfig().pathToPluginFolder
pluginFolderPath = configValues.pathToPluginFolder
if not os.path.isdir(pluginFolderPath):
print(oColors.brightRed + "Plugin folder coulnd*t be found. Creating one..." + oColors.standardWhite)
@@ -129,9 +130,10 @@ def apiTest():
def check_requirements():
configValues = configurationValues()
apiTest()
check_local_plugin_folder()
if not checkConfig().localPluginFolder:
if not configValues.localPluginFolder:
createSFTPConnection()