Changeset

4530:40905e7bf680

configmanager: get(): Make section (core) optional (hurrah)
author Matthew Wild <mwild1@gmail.com>
date Sat, 10 Dec 2011 17:21:19 +0000
parents 4433:f0e72fbe4d6a
children 4541:05f5ec99da77
files core/configmanager.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/core/configmanager.lua	Wed Nov 30 19:37:13 2011 +0000
+++ b/core/configmanager.lua	Sat Dec 10 17:21:19 2011 +0000
@@ -41,6 +41,9 @@
 end
 
 function get(host, section, key)
+	if not key then
+		section, key = "core", section;
+	end
 	local sec = config[host][section];
 	if sec then
 		return sec[key];