passing '' to int() throws an error

This commit is contained in:
Karol Wypchlo 2021-03-02 16:44:56 +01:00
parent 4bd9f122c3
commit c791f3bf08
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ async def block_skylinks_from_airtable():
+ "|".join(skylinks)
+ ")'"
)
cached_files_count = int(exec('docker exec -it nginx bash -c "' + cached_files_command + ' | wc -l"'))
cached_files_count = int(exec('docker exec -it nginx bash -c "' + cached_files_command + ' | wc -l"') or 0)
if cached_files_count == 0:
return print("No nginx cached files matching blocked skylinks were found")