File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -1391,16 +1391,13 @@ def run(self, updatehash=False):
1391
1391
try :
1392
1392
rmtree (outdir )
1393
1393
except OSError as ex :
1394
- if ex .errno == errno .ENOTEMPTY :
1395
- logger .warn ('Folder %s is not empty' % outdir )
1396
- logger .debug ('Folder contents: %s' % "," .join (os .listdir (outdir )))
1397
- for f in os .listdir (outdir ):
1398
- if op .isfile (f ):
1399
- os .remove (f )
1400
- else :
1401
- rmtree (f )
1402
- else :
1403
- raise ex
1394
+ outdircont = os .listdir (outdir )
1395
+ if ((ex .errno == errno .ENOTEMPTY ) and (len (outdircont ) == 0 )):
1396
+ logger .warn (('An exception was raised trying to remove old %s, '
1397
+ 'but the path seems empty. Is it an NFS mount?. '
1398
+ 'Passing the exception.' ) % outdir )
1399
+ pass
1400
+ raise ex
1404
1401
1405
1402
else :
1406
1403
logger .debug (("%s found and can_resume is True or Node is a "
You can’t perform that action at this time.
0 commit comments