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



Title: GitLab

Valentin David pushed to branch bst-1.2 at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/utils.py
    ... ... @@ -679,7 +679,7 @@ def _force_rmtree(rootpath, **kwargs):
    679 679
     
    
    680 680
         try:
    
    681 681
             shutil.rmtree(rootpath, **kwargs)
    
    682
    -    except shutil.Error as e:
    
    682
    +    except OSError as e:
    
    683 683
             raise UtilError("Failed to remove cache directory '{}': {}"
    
    684 684
                             .format(rootpath, e))
    
    685 685
     
    



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