diff options
-rw-r--r-- | platform_utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform_utils.py b/platform_utils.py index e20198ee..45ffec78 100644 --- a/platform_utils.py +++ b/platform_utils.py | |||
@@ -156,6 +156,12 @@ def remove(path, missing_ok=False): | |||
156 | os.rmdir(longpath) | 156 | os.rmdir(longpath) |
157 | else: | 157 | else: |
158 | os.remove(longpath) | 158 | os.remove(longpath) |
159 | elif ( | ||
160 | e.errno == errno.EROFS | ||
161 | and missing_ok | ||
162 | and not os.path.exists(longpath) | ||
163 | ): | ||
164 | pass | ||
159 | elif missing_ok and e.errno == errno.ENOENT: | 165 | elif missing_ok and e.errno == errno.ENOENT: |
160 | pass | 166 | pass |
161 | else: | 167 | else: |