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