diff --git a/src/aria2p/__init__.py b/src/aria2p/__init__.py index 406f948..e0c37d3 100644 --- a/src/aria2p/__init__.py +++ b/src/aria2p/__init__.py @@ -20,3 +20,4 @@ # TODO: write aria2, aria2c, Aria2, Aria2c consistently # TODO: write Torrent, torrent, Metalink, metalink, BitTorrent... consistently # TODO: write all docstrings +# TODO: use proper logging messages (esp. in except: pass) diff --git a/src/aria2p/api.py b/src/aria2p/api.py index e84bd65..d9b0c31 100644 --- a/src/aria2p/api.py +++ b/src/aria2p/api.py @@ -333,9 +333,15 @@ def remove(self, downloads, force=False): result.append(e) else: result.append(True) - self.client.remove_download_result(download.gid) + try: + self.client.remove_download_result(download.gid) + except ClientException: + pass if removed_gid != download.gid: - self.client.remove_download_result(removed_gid) + try: + self.client.remove_download_result(removed_gid) + except ClientException: + pass return result