mirror of
https://github.com/Neocky/pluGET.git
synced 2024-04-29 16:12:30 +00:00
Added catch for HTTPError and added papermc ground work
Changes: - Added HTTPError catch when searching for a plugin - Created first ground work for papermc server jar support
This commit is contained in:
@@ -78,9 +78,15 @@ def searchPackage(ressourceName):
|
||||
ressourceSelected = ressourceSelected - 1
|
||||
ressourceId = packageName[ressourceSelected]["id"]
|
||||
if not checkConfig().localPluginFolder:
|
||||
getSpecificPackage(ressourceId, checkConfig().sftp_folderPath)
|
||||
try:
|
||||
getSpecificPackage(ressourceId, checkConfig().sftp_folderPath)
|
||||
except HTTPError as err:
|
||||
print(oColors.brightRed + f"Error: {err.code} - {err.reason}" + oColors.standardWhite)
|
||||
else:
|
||||
getSpecificPackage(ressourceId, checkConfig().pathToPluginFolder)
|
||||
try:
|
||||
getSpecificPackage(ressourceId, checkConfig().pathToPluginFolder)
|
||||
except HTTPError as err:
|
||||
print(oColors.brightRed + f"Error: {err.code} - {err.reason}" + oColors.standardWhite)
|
||||
|
||||
|
||||
def downloadSpecificVersion(ressourceId, downloadPath, versionID='latest'):
|
||||
|
Reference in New Issue
Block a user