Opened 14 years ago

Closed 14 years ago

#7245 closed patch (fixed)

MythTV Python bindings don't raise proper exceptions when unable to connect

Reported by: superm1@… Owned by: Anduin Withers
Priority: minor Milestone: 0.22
Component: Bindings - Python Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

This causes users of the bindings (such as jamu) to incorrectly report failures.

More details can be seen on https://bugs.edge.launchpad.net/ubuntu/+source/mythplugins/+bug/428473

The jist is this though: Traceback (most recent call last):

File "/usr/share/mythtv/mythvideo/scripts/jamu.py", line 366, in <module>

mythdb = MythDB()

File "/usr/lib/python2.6/dist-packages/MythTV/MythDB.py", line 102, in init

raise MythError?('Connection failed for \'%s\'@\'%s\' to database %s using password %s' % (dbconnuser?, dbconnhost?, dbconnname?, dbconnpass?))

MythError?: <unprintable instance object>

Attachments (1)

proper-exceptions.dpatch (670 bytes) - added by superm1@… 14 years ago.

Download all attachments as: .zip

Change History (2)

Changed 14 years ago by superm1@…

Attachment: proper-exceptions.dpatch added

comment:1 Changed 14 years ago by robertm

Resolution: fixed
Status: newclosed

(In [22275]) Fixes #7245. Modify MythLog? Python Binding to properly handle exceptions, particularly pertaining to Jamu use in MythBuntu?. No functional change, just cleans up the printout of errors emitted.

Note: See TracTickets for help on using tickets.