当前位置: 首页>>代码示例>>Python>>正文


Python KickstartObject.__init__方法代码示例

本文整理汇总了Python中pykickstart.ko.KickstartObject.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python KickstartObject.__init__方法的具体用法?Python KickstartObject.__init__怎么用?Python KickstartObject.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pykickstart.ko.KickstartObject的用法示例。


在下文中一共展示了KickstartObject.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from pykickstart.ko import KickstartObject [as 别名]
# 或者: from pykickstart.ko.KickstartObject import __init__ [as 别名]
    def __init__(self, script, *args , **kwargs):
        """Create a new Script instance.  Instance attributes:

           :keyword errorOnFail: If execution of the script fails, should anaconda
                                 stop, display an error, and then reboot without
                                 running any other scripts?

           :keyword inChroot: Does the script execute in anaconda's chroot
                              environment or not?

           :keyword interp: The program that should be used to interpret this
                            script.

           :keyword lineno: The line number this script starts on.

           :keyword logfile: Where all messages from the script should be logged.

           :keyword script: A string containing all the lines of the script.

           :keyword type: The type of the script, which can be KS_SCRIPT_* from
                          :mod:`pykickstart.constants`.
        """
        KickstartObject.__init__(self, *args, **kwargs)
        self.script = "".join(script)

        self.interp = kwargs.get("interp", "/bin/sh")
        self.inChroot = kwargs.get("inChroot", False)
        self.lineno = kwargs.get("lineno", None)
        self.logfile = kwargs.get("logfile", None)
        self.errorOnFail = kwargs.get("errorOnFail", False)
        self.type = kwargs.get("type", constants.KS_SCRIPT_PRE)
开发者ID:M4rtinK,项目名称:pykickstart,代码行数:33,代码来源:parser.py

示例2: __init__

# 需要导入模块: from pykickstart.ko import KickstartObject [as 别名]
# 或者: from pykickstart.ko.KickstartObject import __init__ [as 别名]
    def __init__(self, *args, **kwargs):
        """Create a new KickstartHandler instance.

           Instance attributes:

           commands -- A mapping from a string command to a KickstartCommand
                       subclass object that handles it.  Multiple strings can
                       map to the same object, but only one instance of the
                       command object should ever exist.  Most users should
                       never have to deal with this directly, as it is
                       manipulated internally and called through dispatcher.
           currentLine -- The current unprocessed line from the input file
                          that caused this handler to be run.
        """
        KickstartObject.__init__(self, *args, **kwargs)

        # These will be set by the dispatcher.
        self.commands = {}
        self.currentLine = ""

        # A dict keyed by an integer priority number, with each value being a
        # list of KickstartCommand subclasses.  This dict is maintained by
        # registerCommand and used in __str__.  No one else should be touching
        # it.
        self._writeOrder = {}
开发者ID:atodorov,项目名称:pykickstart,代码行数:27,代码来源:base.py

示例3: __init__

# 需要导入模块: from pykickstart.ko import KickstartObject [as 别名]
# 或者: from pykickstart.ko.KickstartObject import __init__ [as 别名]
    def __init__(self, *args, **kwargs):
        """Create a new Packages instance.  Instance attributes:

           addBase       -- Should the Base group be installed even if it is
                            not specified?
           nocore        -- Should the Core group be skipped?  This results in
                            a %packages section that basically only installs the
                            packages you list, and may not be a usable system.
           default       -- Should the default package set be selected?
           environment   -- What base environment should be selected?  Only one
                            may be chosen at a time.
           excludedList  -- A list of all the packages marked for exclusion in
                            the %packages section, without the leading minus
                            symbol.
           excludeDocs   -- Should documentation in each package be excluded?
           groupList     -- A list of Group objects representing all the groups
                            specified in the %packages section.  Names will be
                            stripped of the leading @ symbol.
           excludedGroupList -- A list of Group objects representing all the
                                groups specified for removal in the %packages
                                section.  Names will be stripped of the leading
                                [email protected] symbols.
           handleMissing -- If unknown packages are specified in the %packages
                            section, should it be ignored or not?  Values can
                            be KS_MISSING_* from pykickstart.constants.
           packageList   -- A list of all the packages specified in the
                            %packages section.
           instLangs     -- A list of languages to install.
           multiLib      -- Whether to use yum's "all" multilib policy.
           excludeWeakdeps -- Whether to exclude weak dependencies.
           timeout       -- Number of seconds to wait for a connection before
                            yum's or dnf's timing out or None.
           retries       -- Number of times yum's or dnf's attempt to retrieve
                            a file should retry before returning an error.
           seen          -- If %packages was ever used in the kickstart file,
                            this attribute will be set to True.

        """
        KickstartObject.__init__(self, *args, **kwargs)

        self.addBase = True
        self.nocore = False
        self.default = False
        self.environment = None
        self.excludedList = []
        self.excludedGroupList = []
        self.excludeDocs = False
        self.groupList = []
        self.handleMissing = constants.KS_MISSING_PROMPT
        self.packageList = []
        self.instLangs = None
        self.multiLib = False
        self.excludeWeakdeps = False
        self.timeout = None
        self.retries = None
        self.seen = False
开发者ID:rhinstaller,项目名称:pykickstart,代码行数:58,代码来源:parser.py

示例4: __init__

# 需要导入模块: from pykickstart.ko import KickstartObject [as 别名]
# 或者: from pykickstart.ko.KickstartObject import __init__ [as 别名]
    def __init__(self, *args, **kwargs):
        """Create a new BaseData instance.

           lineno -- Line number in the ks-file where this object was defined
        """

        # We don't want people using this class by itself.
        if self.__class__ is BaseData:
            raise TypeError("BaseData is an abstract class.")

        KickstartObject.__init__(self, *args, **kwargs)
        self.lineno = 0
开发者ID:M4rtinK,项目名称:pykickstart,代码行数:14,代码来源:base.py

示例5: __init__

# 需要导入模块: from pykickstart.ko import KickstartObject [as 别名]
# 或者: from pykickstart.ko.KickstartObject import __init__ [as 别名]
    def __init__(self, *args, **kwargs):    # type: (Packages, *Any, **Any) -> None
        """Create a new Packages instance.  Instance attributes:

           addBase       -- Should the Base group be installed even if it is
                            not specified?
           nocore        -- Should the Core group be skipped?  This results in
                            a %packages section that basically only installs the
                            packages you list, and may not be a usable system.
           default       -- Should the default package set be selected?
           environment   -- What base environment should be selected?  Only one
                            may be chosen at a time.
           excludedList  -- A list of all the packages marked for exclusion in
                            the %packages section, without the leading minus
                            symbol.
           excludeDocs   -- Should documentation in each package be excluded?
           groupList     -- A list of Group objects representing all the groups
                            specified in the %packages section.  Names will be
                            stripped of the leading @ symbol.
           excludedGroupList -- A list of Group objects representing all the
                                groups specified for removal in the %packages
                                section.  Names will be stripped of the leading
                                [email protected] symbols.
           handleMissing -- If unknown packages are specified in the %packages
                            section, should it be ignored or not?  Values can
                            be KS_MISSING_* from pykickstart.constants.
           packageList   -- A list of all the packages specified in the
                            %packages section.
           instLangs     -- A list of languages to install.
           multiLib      -- Whether to use yum's "all" multilib policy.
           seen          -- If %packages was ever used in the kickstart file,
                            this attribute will be set to True.

        """
        KickstartObject.__init__(self, *args, **kwargs)

        self.addBase = True # type: bool
        self.nocore = False # type: bool
        self.default = False    # type: bool
        self.environment = None # type: Union[None, str]
        self.excludedList = []  # type: List[str]
        self.excludedGroupList = [] # type: List[Group]
        self.excludeDocs = False    # type: bool
        self.groupList = [] # type: List[Group]
        self.handleMissing = constants.KS_MISSING_PROMPT    # type: int
        self.packageList = []   # type: List[str]
        self.instLangs = None   # type: Union[None, List[str]]
        self.multiLib = False   # type: bool
        self.seen = False   # type: bool
开发者ID:puiterwijk,项目名称:pykickstart,代码行数:50,代码来源:parser.py


注:本文中的pykickstart.ko.KickstartObject.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。