| |
@@ -475,6 +475,10 @@
|
| |
try:
|
| |
os.rmdir(path)
|
| |
except OSError as e:
|
| |
+ if e.errno == errno.ENOTEMPTY:
|
| |
+ # try to find what is there (it could be deleted meanwhile, so it could
|
| |
+ # be empty)
|
| |
+ logger.error("Found these entries: %s", ', '.join(os.listdir(path)))
|
| |
if e.errno != errno.ENOENT:
|
| |
raise
|
| |
|
| |
@@ -515,6 +519,10 @@
|
| |
# For now, we ignore this and proceed, but we'll still fail at
|
| |
# the top level rmdir
|
| |
logger.error("Unable to remove directory %s: %s" % (empty_dir, e))
|
| |
+ if e.errno == errno.ENOTEMPTY:
|
| |
+ # try to find what is there (it could be deleted meanwhile, so it could
|
| |
+ # be empty)
|
| |
+ logger.error("Found these entries: %s", ', '.join(os.listdir(empty_dir)))
|
| |
pass
|
| |
|
| |
if not dirs:
|
| |
Related: https://pagure.io/koji/issue/3755