Added migrations0
This commit is contained in:
parent
81f5ef5686
commit
8802960bf6
File diff suppressed because one or more lines are too long
|
@ -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]
|
Loading…
Reference in New Issue