summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2020-04-03 10:54:43 -0400
committerMike Gilbert <floppym@gentoo.org>2020-04-03 10:55:52 -0400
commit212bc8ce91237d28de326e84ff8607863602d1f7 (patch)
tree367570ab654069d2da11bc3fb03fa5f14f929c42 /dev-lang/python/files/test.support.unlink-ignore-EPERM.patch
parentmedia-sound/qsynth: bump to 0.6.2 (diff)
downloadgentoo-212bc8ce91237d28de326e84ff8607863602d1f7.tar.gz
gentoo-212bc8ce91237d28de326e84ff8607863602d1f7.tar.bz2
gentoo-212bc8ce91237d28de326e84ff8607863602d1f7.zip
dev-lang/python: ignore EPERM in test.support.unlink()
Closes: https://bugs.gentoo.org/679628 Package-Manager: Portage-2.3.96_p4, Repoman-2.3.22_p1 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'dev-lang/python/files/test.support.unlink-ignore-EPERM.patch')
-rw-r--r--dev-lang/python/files/test.support.unlink-ignore-EPERM.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/dev-lang/python/files/test.support.unlink-ignore-EPERM.patch b/dev-lang/python/files/test.support.unlink-ignore-EPERM.patch
new file mode 100644
index 000000000000..291398137c7b
--- /dev/null
+++ b/dev-lang/python/files/test.support.unlink-ignore-EPERM.patch
@@ -0,0 +1,28 @@
+From 789c61e1a1966241d274012cdbd5fb9716448952 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 3 Apr 2020 10:37:56 -0400
+Subject: [PATCH] test.support.unlink: ignore EPERM
+
+Resolves test errors when running in the Gentoo sandbox environment.
+
+Bug: https://bugs.gentoo.org/679628
+---
+ Lib/test/support/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
+index ccc11c1b4b0..c5ec06bb420 100644
+--- a/Lib/test/support/__init__.py
++++ b/Lib/test/support/__init__.py
+@@ -291,7 +291,7 @@ def unlink(filename):
+ try:
+ _unlink(filename)
+ except OSError as exc:
+- if exc.errno not in (errno.ENOENT, errno.ENOTDIR):
++ if exc.errno not in (errno.ENOENT, errno.ENOTDIR, errno.EPERM):
+ raise
+
+ def rmdir(dirname):
+--
+2.26.0
+