# HG changeset patch # User Kim Alvefur # Date 1509570729 -3600 # Node ID fd4a5ba12fa25ed0a64b7dc008a4f1ddd92ac2a2 # Parent 39156d6f7268f2b0a063d81fe83eb746bad2f183 mod_migrate: Catch failure to use user listing API and suggest the alternative diff -r 39156d6f7268 -r fd4a5ba12fa2 mod_migrate/mod_migrate.lua --- a/mod_migrate/mod_migrate.lua Tue Oct 31 19:31:54 2017 +0100 +++ b/mod_migrate/mod_migrate.lua Wed Nov 01 22:12:09 2017 +0100 @@ -62,9 +62,15 @@ migrate_user(arg[i]); end else - for user in um.users(host) do - migrate_user(user); - end + xpcall(function() + for user in um.users(host) do + migrate_user(user); + end + end, + function (err) + module:log("error", "Could not list users, you'll have to supply them as arguments"); + module:log("error", "The error was: %s", err); + end); end end end