summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pym/gentoolkit/eclean/search.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py
index 365970c..60ced02 100644
--- a/pym/gentoolkit/eclean/search.py
+++ b/pym/gentoolkit/eclean/search.py
@@ -111,6 +111,10 @@ class DistfilesSearch:
saved = {}
deprecated = {}
installed_included = False
+ # Check if DISTDIR is empty, return early
+ if not os.listdir(_distdir):
+ return clean_me, saved, deprecated
+
# create a big CPV->SRC_URI dict of packages
# whose distfiles should be kept
if (not destructive) or fetch_restricted: