#NEWLINE# def _migrate_get_earliest_version( ) : #NEWLINE# #INDENT# versions_glob = os . path . join ( MIGRATE_REPO , 'versions' , '???_*.py' ) #NEWLINE# versions = [ ] #NEWLINE# for path in glob . iglob ( versions_glob ) : #NEWLINE# #INDENT# filename = os . path . basename ( path ) #NEWLINE# prefix = filename . split ( '_' , 1 ) [ 0 ] #NEWLINE# try : #NEWLINE# #INDENT# version = int ( prefix ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# versions . append ( version ) #NEWLINE# #UNINDENT# versions . sort ( ) #NEWLINE# return versions [ 0 ]