X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=bin%2Fmailshears;h=5a156f9dce691be8f5e8d0b2e676bec840f2c7a2;hp=9f913621667c686e49504e1b6f465458410c2ca8;hb=18ac3d44b843b0f28fa748146eec78da0561f195;hpb=5c1d0e3ba43ec717422317d34acc50abda5b591e diff --git a/bin/mailshears b/bin/mailshears index 9f91362..5a156f9 100755 --- a/bin/mailshears +++ b/bin/mailshears @@ -116,8 +116,14 @@ Plugin.includers.each do |plugin_class| end leftover_accounts.each do |account| - plugin.delete_account(account) - puts "Removed: #{account} (#{plugin.describe_account(account)})" + begin + plugin.delete_account(account) + puts "Removed: #{account} (#{plugin.describe_account(account)})" + rescue NonexistentAccountError => e + # This usually happens after an account's domain is deleted. + # When we try to delete the account, it's already gone. + puts "Gone: #{account} (#{plugin.describe_account(account)})" + end end end