[Pkg-bitcoin-commits] [python-quamash] 213/269: Supress WindowsError #6 on callbacks

Jonas Smedegaard dr at jones.dk
Fri Nov 24 11:26:35 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository python-quamash.

commit 03370c4bd2c36d73a9173720a8a51b4c5df78f47
Author: Mark Harviston <mark.harviston at gmail.com>
Date:   Sun Jan 18 01:36:56 2015 -0800

    Supress WindowsError #6 on callbacks
    
    This error seems to be some sort of false positive.
---
 tests/test_qeventloop.py | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/test_qeventloop.py b/tests/test_qeventloop.py
index 08fa43a..fa5b512 100644
--- a/tests/test_qeventloop.py
+++ b/tests/test_qeventloop.py
@@ -5,6 +5,7 @@ import asyncio
 import locale
 import logging
 import sys
+import os
 import ctypes
 import multiprocessing
 from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor
@@ -45,8 +46,15 @@ def loop(request, application):
 		finally:
 			asyncio.set_event_loop(None)
 
-		if additional_exceptions:
-			raise additional_exceptions[0]['exception']
+		for exc in additional_exceptions:
+			if (
+				os.name == 'nt' and
+				isinstance(exc['exception'], WindowsError) and
+				exc['exception'].winerror == 6
+			):
+				# ignore Invalid Handle Errors
+				continue
+			raise exc['exception']
 
 	def except_handler(loop, ctx):
 		additional_exceptions.append(ctx)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/python-quamash.git



More information about the Pkg-bitcoin-commits mailing list