Beispiel #1
0
    def bootstrap(self, options):
        Cipher.initialize()

        if options.get('debug', False):
            Runtime.debug(True)

        if options.get('no_parallel', False):
            Runtime.parallel(False)

        if options.get('no_color', False):
            Runtime.color(False)

        if options.get('display_width', False):
            Runtime.width(options.get('display_width'))

        self.init_environment()

        if self.bootstrap_ensure() and settings.CLI_EXEC:
            self._user._ensure(self)

        self.set_options(options, True)

        if self.bootstrap_ensure() and settings.CLI_EXEC:
            self.ensure_resources()

        if self.initialize_services():
            self.manager.initialize_services(settings.STARTUP_SERVICES)
        return self
Beispiel #2
0
    def bootstrap(self, options, primary = False):
        if primary:
            if options.get('debug', False):
                Runtime.debug(True)

            if options.get('no_parallel', False):
                Runtime.parallel(False)

            if options.get('no_color', False):
                Runtime.color(False)

            if options.get('display_width', False):
                Runtime.width(options.get('display_width'))

        self._environment._ensure(self)
        self._user._ensure(self)

        self.set_options(options)
        if primary and self.bootstrap_ensure():
            self.ensure_resources()
Beispiel #3
0
 def display_width(self):
     return self.options.get('display_width', Runtime.width())