aboutsummaryrefslogtreecommitdiffstats
path: root/tools/migration
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2011-12-09 11:37:30 +0500
committerWaqas Hussain <waqas20@gmail.com>2011-12-09 11:37:30 +0500
commita329f8193f3813de6e3005112f7592fc2b741638 (patch)
tree3e821573fc56ad1d3d6333fe916b4498d7bd5a43 /tools/migration
parent73e55a9af4aea54d42f55dbbedd70ce12f14adf0 (diff)
downloadprosody-a329f8193f3813de6e3005112f7592fc2b741638.tar.gz
prosody-a329f8193f3813de6e3005112f7592fc2b741638.zip
migrator/jabberd14: Minor refactoring.
Diffstat (limited to 'tools/migration')
-rw-r--r--tools/migration/migrator/jabberd14.lua15
1 files changed, 6 insertions, 9 deletions
diff --git a/tools/migration/migrator/jabberd14.lua b/tools/migration/migrator/jabberd14.lua
index 47004a52..54c45d94 100644
--- a/tools/migration/migrator/jabberd14.lua
+++ b/tools/migration/migrator/jabberd14.lua
@@ -67,15 +67,12 @@ local parse_xml = (function()
end)();
local function load_xml(path)
- if path then
- local f, err = io_open(path);
- if not f then return f, err; end
- local data = f:read("*a");
- f:close();
- if data then
- return parse_xml(data);
- end
- end
+ local f, err = io_open(path);
+ if not f then return f, err; end
+ local data = f:read("*a");
+ f:close();
+ if not data then return; end
+ return parse_xml(data);
end
local function load_spool_file(host, filename, path)