Opened 10 years ago

Closed 10 years ago

#3736 closed (fixed)

[patch] [4724] uses MySQLdb.__version__ instead of Database.__version__

Reported by: Matt Riggott Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In [4724], MySQLdb is imported as Database. If the required version of MySQLdb isn't found it raises an error:

raise ImportError, "MySQLdb-1.2.1p2 or newer is required; you have %s" % MySQLdb.__version__

However, because the name 'MySQL' doesn't exist, a NameError is raised instead. It should be:

raise ImportError, "MySQLdb-1.2.1p2 or newer is required; you have %s" % Database.__version__

Patch is attached.

Attachments (1)

mysql_base.diff (675 bytes) - added by Matt Riggott 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by Matt Riggott

Attachment: mysql_base.diff added

comment:1 Changed 10 years ago by anonymous

Summary: [4724] uses MySQLdb.__version__ instead of Database.__version__[patch] [4724] uses MySQLdb.__version__ instead of Database.__version__

comment:2 Changed 10 years ago by Simon G. <dev@…>

Triage Stage: UnreviewedReady for checkin

comment:3 Changed 10 years ago by Matt

Resolution: fixed
Status: newclosed

Fixed with another patch in [4751].

Note: See TracTickets for help on using tickets.
Back to Top