testing stuff
This commit is contained in:
parent
3866377470
commit
aa2b83617c
1 changed files with 6 additions and 5 deletions
|
|
@ -989,11 +989,12 @@ async def website(ctx):
|
|||
async with asyncssh.connect(ftp_server, username=ftp_username, password=ftp_password) as conn:
|
||||
async with conn.start_sftp_client() as sftp:
|
||||
for filename in (await sftp.listdir(server_folder)):
|
||||
print("Deleting", filename)
|
||||
try:
|
||||
await sftp.remove(server_folder+filename)
|
||||
except:
|
||||
print("Couldn't delete", filename)
|
||||
if '.png' in filename:
|
||||
try:
|
||||
print("Deleting", filename)
|
||||
await sftp.remove(server_folder+filename)
|
||||
except:
|
||||
print("Couldn't delete", filename)
|
||||
|
||||
'''async def delete_ftp_pngs(server_folder):
|
||||
client = aioftp.Client()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue