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:02:08 (GMT)
commit931fe9c46d12be016e6b952e2c68da887d5a05b2 (patch)
tree3461ef3d69b7c0ef0661324ed76f1cbdbed6f077
parentc77d8edfaa3e999172f2c2ce452f0ae32a897b86 (diff)
Force proper initialization of keys and jumppoints for control socket.
-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 9f3016a..176b91b 100644
--- a/mythtv/bindings/python/MythTV/methodheap.py
+++ b/mythtv/bindings/python/MythTV/methodheap.py
@@ -8,7 +8,7 @@ from MythTV.static import *
from MythTV.exceptions import *
from MythTV.logging import MythLog
from MythTV.connections import FEConnection, XMLConnection, BEEventConnection
-from MythTV.utility import databaseSearch, datetime, check_ipv6
+from MythTV.utility import databaseSearch, datetime, check_ipv6, _donothing
from MythTV.database import DBCache, DBData
from MythTV.system import SystemEvent
from MythTV.mythproto import BECache, FileOps, Program, FreeSpace, EventLock
@@ -489,13 +489,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()
@@ -505,6 +503,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)
@@ -534,13 +533,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):
@@ -568,6 +565,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)