#NEWLINE# def get_all_migrations( self ) : #NEWLINE# #INDENT# if self . all_migrations : #NEWLINE# #INDENT# return self . all_migrations #NEWLINE# #UNINDENT# migrations = [ ] #NEWLINE# for _dir in self . _migrations_dir : #NEWLINE# #INDENT# path = os . path . abspath ( _dir ) #NEWLINE# dir_list = None #NEWLINE# try : #NEWLINE# #INDENT# dir_list = os . listdir ( path ) #NEWLINE# #UNINDENT# except OSError : #NEWLINE# #INDENT# raise Exception ( ( "directory not found ('%s')" % path ) ) #NEWLINE# #UNINDENT# for dir_file in dir_list : #NEWLINE# #INDENT# if ( dir_file . endswith ( Migration . MIGRATION_FILES_EXTENSION ) and Migration . is_file_name_valid ( dir_file ) ) : #NEWLINE# #INDENT# migration = Migration ( ( '%s/%s' % ( path , dir_file ) ) , script_encoding = self . _script_encoding ) #NEWLINE# migrations . append ( migration ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( len ( migrations ) == 0 ) : #NEWLINE# #INDENT# raise Exception ( 'no migration files found' ) #NEWLINE# #UNINDENT# self . all_migrations = Migration . sort_migrations_list ( migrations ) #NEWLINE# return self . all_migrations