[Python-modules-commits] [python-structlog] 06/07: d/patch: fix test failure with recent versions of Twisted
Vincent Bernat
bernat at moszumanska.debian.org
Sat Oct 14 15:54:47 UTC 2017
This is an automated email from the git hooks/post-receive script.
bernat pushed a commit to branch debian/master
in repository python-structlog.
commit 06190bfab1560964e6128773c69cf297b397f4e9
Author: Vincent Bernat <vincent at bernat.im>
Date: Sat Oct 14 17:46:51 2017 +0200
d/patch: fix test failure with recent versions of Twisted
Closes: #876988.
---
debian/changelog | 1 +
...-twisted-don-t-encapsulate-failures-twice.patch | 25 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 27 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index f19aa11..2e84889 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ python-structlog (17.2.0-1) unstable; urgency=medium
* New upstream release.
* d/control: bump Standards-Version.
* d/control: add homepage.
+ * d/patch: fix test failure with recent versions of Twisted. Closes: #876988.
-- Vincent Bernat <bernat at debian.org> Sat, 14 Oct 2017 17:26:56 +0200
diff --git a/debian/patches/0001-twisted-don-t-encapsulate-failures-twice.patch b/debian/patches/0001-twisted-don-t-encapsulate-failures-twice.patch
new file mode 100644
index 0000000..74f4033
--- /dev/null
+++ b/debian/patches/0001-twisted-don-t-encapsulate-failures-twice.patch
@@ -0,0 +1,25 @@
+From: Vincent Bernat <vincent at bernat.im>
+Date: Sat, 14 Oct 2017 17:43:57 +0200
+Subject: twisted: don't encapsulate failures twice
+
+If a failure is already a Failure instance, don't encapsulate it into
+a Failure. Keep it as is.
+
+Fix #144
+---
+ src/structlog/twisted.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/structlog/twisted.py b/src/structlog/twisted.py
+index dc2199b..0fe1e34 100644
+--- a/src/structlog/twisted.py
++++ b/src/structlog/twisted.py
+@@ -107,7 +107,7 @@ def _extractStuffAndWhy(eventDict):
+ _stuff = Failure()
+ # Either we used the error ourselves or the user supplied one for
+ # formatting. Avoid log.err() to dump another traceback into the log.
+- if isinstance(_stuff, BaseException):
++ if isinstance(_stuff, BaseException) and not isinstance(_stuff, Failure):
+ _stuff = Failure(_stuff)
+ if PY2:
+ sys.exc_clear()
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..6441e0a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-twisted-don-t-encapsulate-failures-twice.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-structlog.git
More information about the Python-modules-commits
mailing list