version migration fails if version is an integer

The migration 043 fails to account for the case where the version
was specified as a string or version contains non-ascii characters.
This breaks migration for folks that have those incorrect templatesx
 in their database.

Change-Id: I9c2143c9d7a4d61ff41d32ee0f7b12a5640eec72
Closes-bug: 1299174
This commit is contained in:
Steven Dake 2014-03-28 12:29:26 -07:00
parent bc644814d9
commit f91569de61

View File

@ -44,7 +44,7 @@ def upgrade(migrate_engine):
try:
dt = time.strptime(version, '%Y-%m-%d')
except ValueError:
except (TypeError, ValueError):
dt = None
if dt is None or dt < patch_date: