def __run_pre_all(self):
        """Execute the pre-all.py and pre-all.sql files if they exist"""

        # if the list of delta dirs is [delta1, delta2] the pre scripts of delta2 are
        # executed before the pre scripts of delta1

        for d in reversed(self.dirs):
            pre_all_py_path = os.path.join(d, 'pre-all.py')
            if os.path.isfile(pre_all_py_path):
                print('     Applying pre-all.py...', end=' ')
                self.__run_py_file(pre_all_py_path, 'pre-all')
                print('OK')

            pre_all_sql_path = os.path.join(d, 'pre-all.sql')
            if os.path.isfile(pre_all_sql_path):
                print('     Applying pre-all.sql...', end=' ')
                self.__run_sql_file(pre_all_sql_path)
                print('OK')
def __run_pre_all ( self ) : for d in reversed ( self . dirs ) : pre_all_py_path = os . path . join ( d , 'pre-all.py' ) if os . path . isfile ( pre_all_py_path ) : print ( '     Applying pre-all.py...' , end = ' ' ) self . __run_py_file ( pre_all_py_path , 'pre-all' ) print ( 'OK' ) pre_all_sql_path = os . path . join ( d , 'pre-all.sql' ) if os . path . isfile ( pre_all_sql_path ) : print ( '     Applying pre-all.sql...' , end = ' ' ) self . __run_sql_file ( pre_all_sql_path ) print ( 'OK' )
Execute the pre-all.py and pre-all.sql files if they exist