save a file to alocal folder and make it executable
This commit is contained in:
parent
e54626d971
commit
230cf99f06
8 changed files with 122 additions and 21 deletions
|
@ -31,10 +31,7 @@ class GithubConnector:
|
|||
if response.ok:
|
||||
logger.debug("Latest release found")
|
||||
return response.json()[0]
|
||||
logger.error(
|
||||
"Failed to get latest release from Github. Response code was: %s",
|
||||
response.status_code,
|
||||
)
|
||||
|
||||
raise NoReleaseFound(
|
||||
f"No release found on Github for the repo {repo} from owner {owner}"
|
||||
)
|
||||
|
@ -59,23 +56,10 @@ class GithubConnector:
|
|||
if downloaded_response.ok:
|
||||
return downloaded_response.content
|
||||
|
||||
logger.error(
|
||||
"Failed to download asset from Github repo %s of owner %s. Response code was: %s",
|
||||
repo,
|
||||
owner,
|
||||
downloaded_response.status_code,
|
||||
)
|
||||
raise DownloadFailure(
|
||||
f"The asset {asset_id} was not found on Github for the repo {repo} from owner {owner}"
|
||||
)
|
||||
|
||||
logger.error(
|
||||
"Failed to find asset with id %s from Github repo %s of owner %s. Response code was: %s",
|
||||
asset_id,
|
||||
repo,
|
||||
owner,
|
||||
asset_response.status_code,
|
||||
)
|
||||
raise AssetNotFound(
|
||||
f"The asset {asset_id} was not found on Github for the repo {repo} from owner {owner}"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue