Added migrations0

This commit is contained in:
Marc Aymerich 2015-06-12 12:17:16 +00:00
parent 81f5ef5686
commit 8802960bf6
2 changed files with 34 additions and 0 deletions

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
import re
def extract_version_number(version):
number = re.findall(r'[0-9]+\.?[0-9]?', version)
if not number:
raise ValueError("No version number matches for '%s'" % version)
if len(number) > 1:
raise ValueError("Multiple version number matches for '%s'" % version)
return number[0]