Ticket #10760: 0001-Python-bindings-Relax-mysql-Python-binding-version.patch

File 0001-Python-bindings-Relax-mysql-Python-binding-version.patch, 1.5 KB (added by Lawrence Rust <lvr@…>, 12 years ago)
  • mythtv/bindings/python/MythTV/_conn_mysqldb.py

    From bddd1ab9d2a253671d03b9c4f7d84404c55987aa Mon Sep 17 00:00:00 2001
    From: Lawrence Rust <lvr@softsystem.co.uk>
    Date: Fri, 25 May 2012 18:03:54 +0200
    Subject: [PATCH] Python bindings: Relax mysql Python binding version
    
    Commit 02162459d68a added a check for version 1.2.3 or later of the
    mysql Python binding.  Unfortunately, this version only ships with
    Ubuntu 11.10 and later preventing all but the very latest Ubuntu
    systems from using any MythTV Python app.
    
    Ubuntu 10.04 LTS ships with version 1.2.2 of the mysql binding and
    from basic testing this appears to work OK.
    
    This patch relexaes the mysql Python binding version to 1.2,2 or later.
    
    Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
    ---
     mythtv/bindings/python/MythTV/_conn_mysqldb.py |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/mythtv/bindings/python/MythTV/_conn_mysqldb.py b/mythtv/bindings/python/MythTV/_conn_mysqldb.py
    index d533598..fd56703 100644
    a b import warnings 
    88with warnings.catch_warnings():
    99    warnings.simplefilter('ignore')
    1010    import MySQLdb, MySQLdb.cursors
    11 if (MySQLdb.version_info < (1,2,3)) and (sys.version_info >= (2,7)):
     11if (MySQLdb.version_info < (1,2,2)) and (sys.version_info >= (2,7)):
    1212    raise ImportError('MySQLdb is too old for this version of Python')
    1313
    1414__version__ = tuple(['MySQLdb']+list(MySQLdb.version_info))