forked from pool/python-vistir
- Add py27-missing-exception.patch to workaround bug in Python 2 - Fix py2 only dependencies with fix-py3-backports.patch - Set minimum version of colorama to avoid failures on Leap standard OBS-URL: https://build.opensuse.org/request/show/683061 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vistir?expand=0&rev=3
24 lines
797 B
Diff
24 lines
797 B
Diff
From 02d68f380275e149d02442274b878172da4741ce Mon Sep 17 00:00:00 2001
|
|
From: John Vandenberg <jayvdb@gmail.com>
|
|
Date: Fri, 8 Mar 2019 21:54:00 +0700
|
|
Subject: [PATCH] rmtree: import FileNotFoundError from compat
|
|
|
|
FileNotFoundError does not exist on Python 2.
|
|
---
|
|
src/vistir/path.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/vistir/path.py b/src/vistir/path.py
|
|
index d551aac..adddd01 100644
|
|
--- a/src/vistir/path.py
|
|
+++ b/src/vistir/path.py
|
|
@@ -331,7 +331,7 @@ def rmtree(directory, ignore_errors=False, onerror=None):
|
|
|
|
Setting `ignore_errors=True` may cause this to silently fail to delete the path
|
|
"""
|
|
-
|
|
+ from .compat import FileNotFoundError
|
|
directory = fs_encode(directory)
|
|
if onerror is None:
|
|
onerror = handle_remove_readonly
|