FileNotFoundError will catch when using SFTP

This commit is contained in:
Neocky 2021-03-14 21:07:06 +01:00
parent 662f303935
commit 1e7de3ac5a

View File

@ -122,15 +122,8 @@ def getSpecificPackage(ressourceId, downloadPath, inputPackageVersion='latest'):
if not checkConfig().localPluginFolder: if not checkConfig().localPluginFolder:
if inputPackageVersion is None or inputPackageVersion == 'latest': if inputPackageVersion is None or inputPackageVersion == 'latest':
try: downloadSpecificVersion(ressourceId=ressourceId, downloadPath=downloadPackagePath)
downloadSpecificVersion(ressourceId=ressourceId, downloadPath=downloadPackagePath) deleteTempPluginFolder(downloadPath)
deleteTempPluginFolder(downloadPath)
except HTTPError as err:
print(oColors.brightRed + f"Error: {err.code} - {err.reason}" + oColors.standardWhite)
else: else:
try: downloadSpecificVersion(ressourceId, downloadPackagePath, versionId)
downloadSpecificVersion(ressourceId, downloadPackagePath, versionId) deleteTempPluginFolder(downloadPath)
deleteTempPluginFolder(downloadPath)
except HTTPError as err:
print(oColors.brightRed + f"Error: {err.code} - {err.reason}" + oColors.standardWhite)