logger = logging.getLogger("ddns.core")
logger.propagate = 1
+import database
import providers
from .errors import *
# Add the system class.
self.system = DDNSSystem(self)
+ # Open the database.
+ self.db = database.DDNSDatabase(self, "/var/lib/ddns.db")
+
def get_provider_names(self):
"""
Returns a list of names of all registered providers.
def load_configuration(self, filename):
logger.debug(_("Loading configuration file %s") % filename)
- configs = ConfigParser.SafeConfigParser()
+ configs = ConfigParser.RawConfigParser()
configs.read([filename,])
# First apply all global configuration settings.
logger.warning("Could not find provider '%s' for entry '%s'." % (provider, entry))
continue
+ # Check if the provider is actually supported and if there are
+ # some dependencies missing on this system.
+ if not provider.supported():
+ logger.warning("Provider '%s' is known, but not supported on this machine" % (provider.name))
+ continue
+
# Create an instance of the provider object with settings from the
# configuration file.
entry = provider(self, **settings)