Opened 8 years ago

Closed 8 years ago

#3736 closed (fixed)

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

Reported by: Matt Riggott Owned by: adrian
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 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Matt Riggott

comment:1 Changed 8 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from [4724] uses MySQLdb.__version__ instead of Database.__version__ to [patch] [4724] uses MySQLdb.__version__ instead of Database.__version__

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

  • Triage Stage changed from Unreviewed to Ready for checkin

comment:3 Changed 8 years ago by Matt

  • Resolution set to fixed
  • Status changed from new to closed

Fixed with another patch in [4751].

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