summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Wagner <rwagner@mythtv.org>2012-05-27 06:02:08 (GMT)
committer Raymond Wagner <rwagner@mythtv.org>2012-05-27 06:06:39 (GMT)
commit912907942fef7d73f830288d2817a85d324b66b8 (patch)
tree7c32012ee56b7739984c58dcf109b1aaf797a800
parentcde2063c3ac640ff94c98a86f0cc20a8ab81321b (diff)
Force proper initialization of keys and jumppoints for control socket.
(cherry picked from commit 931fe9c46d12be016e6b952e2c68da887d5a05b2) Conflicts: mythtv/bindings/python/MythTV/methodheap.py
-rw-r--r--mythtv/bindings/python/MythTV/methodheap.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/mythtv/bindings/python/MythTV/methodheap.py b/mythtv/bindings/python/MythTV/methodheap.py
index 3b6ec6a..fe8a536 100644
--- a/mythtv/bindings/python/MythTV/methodheap.py
+++ b/mythtv/bindings/python/MythTV/methodheap.py
@@ -10,7 +10,7 @@ from static import *
from exceptions import *
from logging import MythLog
from connections import FEConnection, XMLConnection
-from utility import databaseSearch, datetime
+from utility import databaseSearch, datetime, _donothing
from database import DBCache, DBData
from system import SystemEvent
from mythproto import BEEvent, FileOps, Program, FreeSpace
@@ -468,13 +468,11 @@ class Frontend( FEConnection ):
def __init__(self, parent):
self._parent = proxy(parent)
- self._populated = False
self._points = {}
def _populate(self):
- if not self._populated:
- self._points = dict(self._parent.send('jump'))
- self._populated = True
+ self._populate = _donothing
+ self._points = dict(self._parent.send('jump'))
def __getitem__(self, key):
self._populate()
@@ -484,6 +482,7 @@ class Frontend( FEConnection ):
return False
def __getattr__(self, key):
+ self._populate()
if key in self.__dict__:
return self.__dict__[key]
return self.__getitem__(key)
@@ -513,13 +512,11 @@ class Frontend( FEConnection ):
def __init__(self, parent):
self._parent = proxy(parent)
- self._populated = False
self._keys = []
def _populate(self):
- if not self._populated:
- self._keys = self._parent.send('key')
- self._populated = True
+ self._populate = _donothing
+ self._keys = self._parent.send('key')
def _sendLiteral(self, key):
if (key in self._keys) or (key in self._alnum):
@@ -547,6 +544,7 @@ class Frontend( FEConnection ):
return False
def __getattr__(self, key):
+ self._populate()
if key in self.__dict__:
return self.__dict__[key]
return self._sendLiteral(key)