deluge: Utilize purging of packages and don't remove explicitly

Tests:

- None. deluge is not installable.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2023-06-06 10:31:15 -07:00 committed by James Valleroy
parent 5be1b1ad2b
commit b51ed200f7
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -160,7 +160,6 @@ def _wait_for_configuration(service, file_name):
@privileged
def uninstall():
"""Remove configuration and service files."""
for item in DELUGED_DEFAULT_FILE, DELUGE_WEB_SYSTEMD_SERVICE_PATH:
pathlib.Path(item).unlink(missing_ok=True)
# /etc/default/deluged is removed on purge
pathlib.Path(DELUGE_WEB_SYSTEMD_SERVICE_PATH).unlink(missing_ok=True)
shutil.rmtree(DELUGE_CONF_DIR, ignore_errors=True)