[Notes] [Git][BuildStream/buildstream][master] 2 commits: Catch correct exception from shutil.rmtree



Title: GitLab

Valentin David pushed to branch master at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/utils.py
    ... ... @@ -686,7 +686,7 @@ def _force_rmtree(rootpath, **kwargs):
    686 686
     
    
    687 687
         try:
    
    688 688
             shutil.rmtree(rootpath, **kwargs)
    
    689
    -    except shutil.Error as e:
    
    689
    +    except OSError as e:
    
    690 690
             raise UtilError("Failed to remove cache directory '{}': {}"
    
    691 691
                             .format(rootpath, e))
    
    692 692
     
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]