Comparison

prosodyctl @ 8265:17ebd8ac8545

prosodyctl check: Fix traceback when no modules_enabled are defined (e.g., a completely empty config)
author Waqas Hussain <waqas20@gmail.com>
date Sun, 24 Sep 2017 18:23:45 -0400
parent 8249:cc664a3917e2
child 8268:e21d82551e05
child 8274:3798955049e3
comparison
equal deleted inserted replaced
8264:23aee8ccfe9b 8265:17ebd8ac8545
1030 for host, options in enabled_hosts() do 1030 for host, options in enabled_hosts() do
1031 if not options.component_module and options.modules_enabled then 1031 if not options.component_module and options.modules_enabled then
1032 suggested_global_modules = set.intersection(suggested_global_modules or set.new(options.modules_enabled), set.new(options.modules_enabled)); 1032 suggested_global_modules = set.intersection(suggested_global_modules or set.new(options.modules_enabled), set.new(options.modules_enabled));
1033 end 1033 end
1034 end 1034 end
1035 if not suggested_global_modules:empty() then 1035 if suggested_global_modules and not suggested_global_modules:empty() then
1036 print(" Consider moving these modules into modules_enabled in the global section:") 1036 print(" Consider moving these modules into modules_enabled in the global section:")
1037 print(" "..tostring(suggested_global_modules / function (x) return ("%q"):format(x) end)); 1037 print(" "..tostring(suggested_global_modules / function (x) return ("%q"):format(x) end));
1038 end 1038 end
1039 print(); 1039 print();
1040 end 1040 end