Opened 6 years ago

Closed 6 years ago

#10351 closed Bug Report - General (Fixed)

Python bindings failure when MasterServer=BackendServerIP6

Reported by: Bill Meek <keemllib@…> Owned by: wagnerrp
Priority: minor Milestone: 0.25
Component: Bindings - Python Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no


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/", line 3, in <module>
  be = MythBE()
    File "/usr/local/lib/python2.7/dist-packages/MythTV/", line 97, in __init__
    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/ b/mythtv/bindings/python/MythTV/
index a8420f9..476c13c 100644
--- a/mythtv/bindings/python/MythTV/
+++ b/mythtv/bindings/python/MythTV/
@@ -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=?""", []) == 0:
                     # no match found
-                    raise MythDBError(MythError.DB_SETTING, 'BackendServerIP',
+                    raise MythDBError(MythError.DB_SETTING, 'BackendServerIP/6',
                 self.hostname = cursor.fetchone()[0]


Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by wagnerrp

  • Milestone changed from unknown to 0.25
  • Status changed from new to accepted

comment:2 Changed 6 years ago by wagnerrp

  • Resolution set to Fixed
  • Status changed from accepted to closed

Correct handling of IP addresses in Python bindings.

This adds support for proper forward and reverse host resolution using the new BackendServerIP6 setting.

Fixes #10351

Branch: master
Changeset: 8b509a01cb17cd92010b24d28f0c343ffc454b25

Add Comment

Modify Ticket

as closed The owner will remain wagnerrp.
The resolution will be deleted. Next status will be 'new'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.