about summary refs log tree commit diff
path: root/lib/tasks
diff options
context:
space:
mode:
authorJenkins <jenkins@jenkins.ninjawedding.org>2018-03-25 15:17:21 +0000
committerJenkins <jenkins@jenkins.ninjawedding.org>2018-03-25 15:17:21 +0000
commit837b3804bfed9db1cf92923c4f6202aa7117d408 (patch)
treec8b5a921754a6b40227364225002332b54d0d0dd /lib/tasks
parent995b59526b06e1f949cba59d76e5e2718a1674f6 (diff)
parent85a395fab6d7077a252bfe6f96673931ea3aa5ee (diff)
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/mastodon.rake4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake
index cf32b1495..0972e4367 100644
--- a/lib/tasks/mastodon.rake
+++ b/lib/tasks/mastodon.rake
@@ -777,7 +777,7 @@ namespace :mastodon do
         progress_bar.increment
 
         begin
-          res = Request.new(:head, account.uri).perform
+          code = Request.new(:head, account.uri).perform(&:code)
         rescue StandardError
           # This could happen due to network timeout, DNS timeout, wrong SSL cert, etc,
           # which should probably not lead to perceiving the account as deleted, so
@@ -785,7 +785,7 @@ namespace :mastodon do
           next
         end
 
-        if [404, 410].include?(res.code)
+        if [404, 410].include?(code)
           if options[:force]
             SuspendAccountService.new.call(account)
             account.destroy