Added exceptions to deleting pngs function
This commit is contained in:
parent
253a805b4e
commit
3866377470
1 changed files with 4 additions and 1 deletions
|
|
@ -990,7 +990,10 @@ async def website(ctx):
|
||||||
async with conn.start_sftp_client() as sftp:
|
async with conn.start_sftp_client() as sftp:
|
||||||
for filename in (await sftp.listdir(server_folder)):
|
for filename in (await sftp.listdir(server_folder)):
|
||||||
print("Deleting", filename)
|
print("Deleting", filename)
|
||||||
await sftp.remove(server_folder+filename)
|
try:
|
||||||
|
await sftp.remove(server_folder+filename)
|
||||||
|
except:
|
||||||
|
print("Couldn't delete", filename)
|
||||||
|
|
||||||
'''async def delete_ftp_pngs(server_folder):
|
'''async def delete_ftp_pngs(server_folder):
|
||||||
client = aioftp.Client()
|
client = aioftp.Client()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue