testing stuff

This commit is contained in:
phixxy 2023-12-27 23:10:14 -08:00
parent 3866377470
commit aa2b83617c

View file

@ -989,11 +989,12 @@ 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:
await sftp.remove(server_folder+filename) print("Deleting", filename)
except: await sftp.remove(server_folder+filename)
print("Couldn't delete", 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()