Comparison

tools/migration/prosody-migrator.lua @ 8062:739bb455cafd

migrator: Remove broken distinction between a load error or a missing storage handler (worked with module()?)
author Kim Alvefur <zash@zash.se>
date Fri, 07 Apr 2017 13:06:06 +0200
parent 7895:1e1c18012048
child 10003:4d702f0c6273
comparison
equal deleted inserted replaced
8061:ef671d337577 8062:739bb455cafd
75 print("Error: "..name.." store type not specified in the config file"); 75 print("Error: "..name.." store type not specified in the config file");
76 return false; 76 return false;
77 else 77 else
78 local ok, err = pcall(require, "migrator."..store_type); 78 local ok, err = pcall(require, "migrator."..store_type);
79 if not ok then 79 if not ok then
80 if package.loaded["migrator."..store_type] then 80 print(("Error: Failed to initialize '%s' store:\n\t%s")
81 print(("Error: Failed to initialize '%s' store:\n\t%s") 81 :format(name, err));
82 :format(name, err));
83 else
84 print(("Error: Unrecognised store type for '%s': %s")
85 :format(from_store, store_type));
86 end
87 return false; 82 return false;
88 end 83 end
89 end 84 end
90 return true; 85 return true;
91 end 86 end