From 7e147938de921a290bfa13e25b392f64298912d2 Mon Sep 17 00:00:00 2001 From: chris48s Date: Sat, 2 Sep 2023 21:11:05 +0100 Subject: [PATCH] improve error handling --- pip_abandoned/lib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pip_abandoned/lib.py b/pip_abandoned/lib.py index c4a6835..48f1e28 100644 --- a/pip_abandoned/lib.py +++ b/pip_abandoned/lib.py @@ -135,6 +135,8 @@ def search(gh_token, path, verbosity): set_log_level(verbosity) dists = list(distributions(path=[path])) + if len(dists) == 0: + raise Exception(f"Couldn't find any packages in {path}") inactive_packages = [dist for dist in dists if is_inactive(dist)]