fixed bug in derp deleting function
This commit is contained in:
parent
05915e021d
commit
2951f210cd
1 changed files with 3 additions and 1 deletions
|
|
@ -318,7 +318,9 @@ async def delete_derp_files(server_folder):
|
|||
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)):
|
||||
if filename != '.' or filename != '..' or filename != 'style.css' or filename != 'myScript.js':
|
||||
if filename == '.' or filename == '..' or filename == 'style.css' or filename == 'myScript.js':
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
print("Deleting", filename)
|
||||
await sftp.remove(server_folder+filename)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue