[Python-modules-commits] [pychromecast] 06/15: Style fix to socket client.

Ruben Undheim rubund-guest at moszumanska.debian.org
Sat Sep 12 12:30:56 UTC 2015


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

rubund-guest pushed a commit to branch master
in repository pychromecast.

commit e80295273deef634448774a2d6a5649152097cd1
Author: Ryan Kraus <rmkraus at gmail.com>
Date:   Sun Aug 23 03:37:54 2015 -0400

    Style fix to socket client.
    
    Changed expired property in the socket client’s PING handler to a
    function.
---
 pychromecast/socket_client.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/pychromecast/socket_client.py b/pychromecast/socket_client.py
index 1f24521..ba52e67 100644
--- a/pychromecast/socket_client.py
+++ b/pychromecast/socket_client.py
@@ -217,7 +217,7 @@ class SocketClient(threading.Thread):
         while not self.stop.is_set():
 
             # check if connection is expired
-            if self.heartbeat_controller.expired:
+            if self.heartbeat_controller.is_expired():
                 self.logger.error(
                     "Error communicating with socket, resetting connection")
                 try:
@@ -482,8 +482,7 @@ class HeartbeatController(BaseController):
         """ Reset expired counter. """
         self.last_pong = time.time()
 
-    @property
-    def expired(self):
+    def is_expired(self):
         """ Indicates if connection has expired. """
         if time.time() - self.last_ping > HB_PING_TIME:
             self.ping()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pychromecast.git



More information about the Python-modules-commits mailing list