[Pkg-bitcoin-commits] [python-quamash] 145/269: Handle self._ssock being None

Jonas Smedegaard dr at jones.dk
Fri Nov 24 11:26:25 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 3d53ff6f848b3a0ed6b815608ef7714cd705f508
Author: Arve Knudsen <arve.knudsen at gmail.com>
Date:   Sat Dec 6 23:02:17 2014 +0100

    Handle self._ssock being None
---
 quamash/_unix.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/quamash/_unix.py b/quamash/_unix.py
index 5883718..e12325a 100644
--- a/quamash/_unix.py
+++ b/quamash/_unix.py
@@ -224,12 +224,13 @@ class _SelectorEventLoop(asyncio.SelectorEventLoop):
 			len(self._signal_safe_callbacks)
 		))
 
-		# Acknowledge command
-		self._ssock.recv(1)
-		for handle in self._signal_safe_callbacks[:]:
-			self._logger.debug('Scheduling signal callback {}'.format(handle))
-			self._signal_safe_callbacks.remove(handle)
-			self._add_callback(handle)
+		if self._ssock is not None:
+			# Acknowledge command
+			self._ssock.recv(1)
+			for handle in self._signal_safe_callbacks[:]:
+				self._logger.debug('Scheduling signal callback {}'.format(handle))
+				self._signal_safe_callbacks.remove(handle)
+				self._add_callback(handle)
 
 
 baseclass = _SelectorEventLoop

-- 
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