Ejemplo n.º 1
0
Archivo: config.py Proyecto: inkhey/mmc
    def readConf(self):
        """
        Read web section of the imaging plugin configuration file
        """
        PluginConfig.readConf(self)
        if not self.disabled:
            ImagingDatabaseConfig.setup(self, self.conffile)
            if self.has_section("web"):
                for option in self.options("web"):
                    # option variable is lowercase
                    setattr(self, option, self.get("web", option))

        setattr(self, "network", "resolv_order")
        if not type(self.resolv_order) == type([]):
            self.resolv_order = self.resolv_order.split(' ')

        if self.has_option("network", "preferred_network"):
            self.preferred_network = self.get("network", "preferred_network")
        else :
            self.preferred_network = ''

        try:
            self.purge_interval = self.get('main', 'purge_interval')
        except (NoOptionError, NoSectionError):
            self.purge_interval = '23 0 * * 0'
Ejemplo n.º 2
0
    def readConf(self):
        """
        Read web section of the imaging plugin configuration file
        """
        PluginConfig.readConf(self)
        if not self.disabled:
            ImagingDatabaseConfig.setup(self, self.conffile)
            if self.has_section("web"):
                for option in self.options("web"):
                    # option variable is lowercase
                    setattr(self, option, self.get("web", option))

        setattr(self, "network", "resolv_order")
        if not type(self.resolv_order) == type([]):
            self.resolv_order = self.resolv_order.split(' ')

        if self.has_option("network", "preferred_network"):
            self.preferred_network = self.get("network", "preferred_network")
        else:
            self.preferred_network = ''

        try:
            self.purge_interval = self.get('main', 'purge_interval')
        except (NoOptionError, NoSectionError):
            self.purge_interval = '23 0 * * 0'
Ejemplo n.º 3
0
 def readConf(self):
     """
     Read web section of the imaging plugin configuration file
     """
     PluginConfig.readConf(self)
     if not self.disabled:
         ImagingDatabaseConfig.setup(self, self.conffile)
         if self.has_section("web"):
             for option in self.options("web"):
                 # option variable is lowercase
                 setattr(self, option, self.get("web", option))
Ejemplo n.º 4
0
 def readConf(self):
     """
     Read web section of the imaging plugin configuration file
     """
     PluginConfig.readConf(self)
     if not self.disabled:
         ImagingDatabaseConfig.setup(self, self.conffile)
         if self.has_section("web"):
             for i in (
                 "date_fmt",
                 "default_protocol",
                 "default_menu_name",
                 "default_timeout",
                 "default_background_uri",
                 "default_message",
             ):
                 full_name = "web_def_%s" % i
                 if self.has_option("web", full_name):
                     setattr(self, full_name, self.get("web", full_name))
Ejemplo n.º 5
0
Archivo: config.py Proyecto: allgi/mmc
    def readConf(self):
        """
        Read web section of the imaging plugin configuration file
        """
        PluginConfig.readConf(self)
        if not self.disabled:
            ImagingDatabaseConfig.setup(self, self.conffile)
            if self.has_section("web"):
                for option in self.options("web"):
                    # option variable is lowercase
                    setattr(self, option, self.get("web", option))

        setattr(self, "network", "resolv_order")
        if not type(self.resolv_order) == type([]):
            self.resolv_order = self.resolv_order.split(' ')

        pnp = PreferredNetworkParser(None, None)
        if self.has_option("network", "preferred_network"):
            self.preferred_network = pnp.parse(self.get("network", "preferred_network"))
        else :
            self.preferred_network = pnp.get_default()
Ejemplo n.º 6
0
Archivo: config.py Proyecto: allgi/mmc
    def readConf(self):
        """
        Read web section of the imaging plugin configuration file
        """
        PluginConfig.readConf(self)
        if not self.disabled:
            ImagingDatabaseConfig.setup(self, self.conffile)
            if self.has_section("web"):
                for option in self.options("web"):
                    # option variable is lowercase
                    setattr(self, option, self.get("web", option))

        setattr(self, "network", "resolv_order")
        if not type(self.resolv_order) == type([]):
            self.resolv_order = self.resolv_order.split(' ')

        pnp = PreferredNetworkParser(None, None)
        if self.has_option("network", "preferred_network"):
            self.preferred_network = pnp.parse(
                self.get("network", "preferred_network"))
        else:
            self.preferred_network = pnp.get_default()
Ejemplo n.º 7
0
 def __init__(self, name = 'imaging', conffile = None):
     if not hasattr(self, 'initdone'):
         PluginConfig.__init__(self, name, conffile)
         ImagingDatabaseConfig.__init__(self)
         self.initdone = True
Ejemplo n.º 8
0
 def __init__(self, name='imaging', conffile=None):
     if not hasattr(self, 'initdone'):
         PluginConfig.__init__(self, name, conffile)
         ImagingDatabaseConfig.__init__(self)
         self.initdone = True