[mythtv-commits] Ticket #10351: Python bindings failure when MasterServer=BackendServerIP6
MythTV
noreply at mythtv.org
Sat Feb 18 05:29:03 UTC 2012
#10351: Python bindings failure when MasterServer=BackendServerIP6
------------------------------------------------+-------------------------
Reporter: Bill Meek <keemllib@…> | Owner: wagnerrp
Type: Bug Report - General | Status: new
Priority: minor | Milestone: unknown
Component: Bindings - Python | Version: Master Head
Severity: medium | Keywords:
Ticket locked: 0 |
------------------------------------------------+-------------------------
Running on: v0.25pre-4589-gf4a1079.
To duplicate, create this fragment of a python script.
{{{
#!/usr/bin/env python
from MythTV import MythBE
be = MythBE()
}}}
Executing the above results in:
{{{
Traceback (most recent call last):
File "/home/bill/bin/test.py", line 3, in <module>
be = MythBE()
File "/usr/local/lib/python2.7/dist-packages/MythTV/mythproto.py",
line 97, in __init__
self.host)
MythTV.exceptions.MythDBError: Could not find setting
'BackendServerIP' on host 'fd00::f00'
}}}
The following allows the script above (and find-orphans)
to run:
{{{
diff --git a/mythtv/bindings/python/MythTV/mythproto.py
b/mythtv/bindings/python/MythTV/mythproto.py
index a8420f9..476c13c 100644
--- a/mythtv/bindings/python/MythTV/mythproto.py
+++ b/mythtv/bindings/python/MythTV/mythproto.py
@@ -91,9 +91,10 @@ class BECache( object ):
with self.db.cursor(self.log) as cursor:
if cursor.execute("""SELECT hostname FROM settings
WHERE value='BackendServerIP'
+ OR value='BackendServerIP6'
AND data=?""", [self.host]) == 0:
# no match found
- raise MythDBError(MythError.DB_SETTING,
'BackendServerIP',
+ raise MythDBError(MythError.DB_SETTING,
'BackendServerIP/6',
self.host)
self.hostname = cursor.fetchone()[0]
}}}
~
--
Ticket URL: <http://code.mythtv.org/trac/ticket/10351>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list