Closes: https://bugs.gentoo.org/671592
Signed-off-by: Matt Turner <matts...@gentoo.org>
---
 pym/gentoolkit/eclean/clean.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pym/gentoolkit/eclean/clean.py b/pym/gentoolkit/eclean/clean.py
index b790de0..89300ce 100644
--- a/pym/gentoolkit/eclean/clean.py
+++ b/pym/gentoolkit/eclean/clean.py
@@ -139,6 +139,10 @@ class CleanUp(object):
                                        # only count size if successfully 
deleted and not a link
                                        if statinfo.st_nlink == 1:
                                                clean_size += statinfo.st_size
+                                               try:
+                                                       
os.rmdir(os.path.dirname(file_))
+                                               except OSError as er:
+                                                       pass
                                except EnvironmentError as er:
                                        print( pp.error("Could not delete 
"+file_), file=sys.stderr)
                                        print( pp.error("Error: %s" %str(er)), 
file=sys.stderr)
-- 
2.23.0


Reply via email to