forked from pool/python-Send2Trash
- Update to 1.5.0:
* More specific error when failing to create XDG fallback trash directory (#20) * Windows: Workaround for long paths (#23) - Add patch to test properly under python2: * python2.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Send2Trash?expand=0&rev=7
This commit is contained in:
committed by
Git OBS Bridge
parent
dfc65d9882
commit
ba84b74220
26
python2.patch
Normal file
26
python2.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
From 74352462f5df2cb5708b96458b81afef3070c800 Mon Sep 17 00:00:00 2001
|
||||
From: Virgil Dupras <hsoft@hardcoded.net>
|
||||
Date: Thu, 26 Jul 2018 08:30:39 -0400
|
||||
Subject: [PATCH] Fix broken tests on py2
|
||||
|
||||
---
|
||||
tests/test_plat_other.py | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/test_plat_other.py b/tests/test_plat_other.py
|
||||
index b94295d..ae4f391 100644
|
||||
--- a/tests/test_plat_other.py
|
||||
+++ b/tests/test_plat_other.py
|
||||
@@ -6,7 +6,11 @@
|
||||
import send2trash.plat_other
|
||||
from send2trash.plat_other import send2trash as s2t
|
||||
from send2trash.compat import PY3
|
||||
-from configparser import ConfigParser
|
||||
+try:
|
||||
+ from configparser import ConfigParser
|
||||
+except ImportError:
|
||||
+ # py2
|
||||
+ from ConfigParser import ConfigParser
|
||||
from tempfile import mkdtemp, NamedTemporaryFile, mktemp
|
||||
import shutil
|
||||
import stat
|
||||
Reference in New Issue
Block a user