Diff

tools/dnsregistry.lua @ 13142:879a6a33c21b

tools: Update imports to use new prosody.* namespace
author Kim Alvefur <zash@zash.se>
date Thu, 08 Jun 2023 09:37:01 +0200
parent 12855:3306807c0619
line wrap: on
line diff
--- a/tools/dnsregistry.lua	Sat Jun 10 13:06:05 2023 +0200
+++ b/tools/dnsregistry.lua	Thu Jun 08 09:37:01 2023 +0200
@@ -1,5 +1,8 @@
 -- Generate util/dnsregistry.lua from IANA HTTP status code registry
-local xml = require "util.xml";
+if not pcall(require, "prosody.loader") then
+	pcall(require, "loader");
+end
+local xml = require "prosody.util.xml";
 local registries = xml.parse(io.read("*a"), { allow_processing_instructions = true });
 
 print("-- Source: https://www.iana.org/assignments/dns-parameters/dns-parameters.xml");