PyFunceble/generate.py
def status_file(self):  # pylint: disable=inconsistent-return-statements
        """
        Generate a file according to the domain status.
        """

        if "file_to_test" in PyFunceble.INTERN:
            # We are not testing as an imported module.

            # We generate the hosts file.
            Generate(self.domain_status, self.source, self.expiration_date).info_files()

            # We are testing a file content.

            # We increase the percentage count.
            Percentage(self.domain_status).count()

            # We print on screen if needed.
            self._prints_status_screen()

            if self._do_not_produce_file():
                return None

            if (
                not PyFunceble.CONFIGURATION["no_files"]
                and PyFunceble.CONFIGURATION["split"]
            ):
                # * The file non-generation of file is globaly deactivated.
                # and
                # * We have to split the outputs.

                # We print or generate the files.
                self._prints_status_file()
            else:
                # * The file non-generation of file is globaly activated.
                # or
                # * We do not have to split the outputs.

                # We print or generate the unified files.
                self.unified_file()
def status_file(self):  # pylint: disable=inconsistent-return-statements
        if "file_to_test" in PyFunceble.INTERN:
            # We are not testing as an imported module.

            # We generate the hosts file.
            Generate(self.domain_status, self.source, self.expiration_date).info_files()

            # We are testing a file content.

            # We increase the percentage count.
            Percentage(self.domain_status).count()

            # We print on screen if needed.
            self._prints_status_screen()

            if self._do_not_produce_file():
                return None

            if (
                not PyFunceble.CONFIGURATION["no_files"]
                and PyFunceble.CONFIGURATION["split"]
            ):
                # * The file non-generation of file is globaly deactivated.
                # and
                # * We have to split the outputs.

                # We print or generate the files.
                self._prints_status_file()
            else:
                # * The file non-generation of file is globaly activated.
                # or
                # * We do not have to split the outputs.

                # We print or generate the unified files.
                self.unified_file()
def status_file ( self ) : # pylint: disable=inconsistent-return-statements if "file_to_test" in PyFunceble . INTERN : # We are not testing as an imported module. # We generate the hosts file. Generate ( self . domain_status , self . source , self . expiration_date ) . info_files ( ) # We are testing a file content. # We increase the percentage count. Percentage ( self . domain_status ) . count ( ) # We print on screen if needed. self . _prints_status_screen ( ) if self . _do_not_produce_file ( ) : return None if ( not PyFunceble . CONFIGURATION [ "no_files" ] and PyFunceble . CONFIGURATION [ "split" ] ) : # * The file non-generation of file is globaly deactivated. # and # * We have to split the outputs. # We print or generate the files. self . _prints_status_file ( ) else : # * The file non-generation of file is globaly activated. # or # * We do not have to split the outputs. # We print or generate the unified files. self . unified_file ( )
Generate a file according to the domain status.
Generate a file according to the domain status .