fix: remove empty dir with right call

pull/298/head
Raphaël Vinot 2021-12-01 09:37:57 +01:00
parent b75540cd7d
commit 0835bcefa0
1 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ class Phishtank():
urls = self.client.get_urls_by_ip(ip)
if not urls:
ip_storage_dir.unlink()
ip_storage_dir.rmdir()
return
to_dump = {'ip': ip, 'urls': urls}
with pt_file.open('w') as _f:
@ -142,7 +142,7 @@ class Phishtank():
url_information = self.client.get_url_entry(url)
if not url_information:
url_storage_dir.unlink()
url_storage_dir.rmdir()
return
with pt_file.open('w') as _f: