# HG changeset patch # User Matthew Wild # Date 1335548080 -3600 # Node ID a9f6088a83e3b355b47fa6f285d5f88b4f44017a # Parent 3c0321e3fa7677a1c0c69f26b6a3d50542a6c5be moduleapi: get_host_type(): Return nil for global modules (no host) diff -r 3c0321e3fa76 -r a9f6088a83e3 core/moduleapi.lua --- a/core/moduleapi.lua Thu Apr 26 16:53:32 2012 +0100 +++ b/core/moduleapi.lua Fri Apr 27 18:34:40 2012 +0100 @@ -42,7 +42,7 @@ end function api:get_host_type() - return hosts[self.host].type; + return self.host ~= "*" and hosts[self.host].type or nil; end function api:set_global()