# HG changeset patch # User Kim Alvefur # Date 1530993300 -7200 # Node ID bd9b67f742c928b4d3fee43b942bf344caf698ef # Parent 972b6f793ff9688595ac983b0879c7da1762cfd9 moduleapi: Lazy-load configmanager on demand simplify dependency graph diff -r 972b6f793ff9 -r bd9b67f742c9 core/moduleapi.lua --- a/core/moduleapi.lua Sat Jul 07 21:00:59 2018 +0200 +++ b/core/moduleapi.lua Sat Jul 07 21:55:00 2018 +0200 @@ -6,7 +6,6 @@ -- COPYING file in the source package for more information. -- -local config = require "core.configmanager"; local array = require "util.array"; local set = require "util.set"; local it = require "util.iterators"; @@ -196,6 +195,7 @@ end function api:get_option(name, default_value) + local config = require "core.configmanager"; local value = config.get(self.host, name); if value == nil then value = default_value;