mirror of
https://github.com/Neocky/pluGET.git
synced 2024-04-29 16:12:30 +00:00
Better config handling & better output for serverjar
Changes: - better config handling - better output for serverjar checking
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user