Dduvall has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/192356

Change subject: Corrected Style/RedundantBegin RuboCop offenses
......................................................................

Corrected Style/RedundantBegin RuboCop offenses

Change-Id: I041da78dfed0593a71d0239cc93e55a7889dfab6
---
M .rubocop_todo.yml
M lib/mediawiki_selenium/support/modules/api_helper.rb
2 files changed, 3 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium 
refs/changes/56/192356/1

diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 2c817b6..a8cb048 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -5,11 +5,6 @@
 # Note that changes in the inspected code, or installation of new
 # versions of RuboCop, may require this file to be generated again.
 
-# Offense count: 1
-# Cop supports --auto-correct.
-Style/RedundantBegin:
-  Enabled: false
-
 # Offense count: 2
 # Cop supports --auto-correct.
 Style/RedundantSelf:
diff --git a/lib/mediawiki_selenium/support/modules/api_helper.rb 
b/lib/mediawiki_selenium/support/modules/api_helper.rb
index 029974e..774bc24 100644
--- a/lib/mediawiki_selenium/support/modules/api_helper.rb
+++ b/lib/mediawiki_selenium/support/modules/api_helper.rb
@@ -26,11 +26,9 @@
     # @param id [Symbol] ID of alternative user.
     #
     def ensure_account(id)
-      begin
-        api.create_account(user(id), password(id))
-      rescue MediawikiApi::ApiError => e
-        raise e unless e.code == "userexists"
-      end
+      api.create_account(user(id), password(id))
+    rescue MediawikiApi::ApiError => e
+      raise e unless e.code == "userexists"
     end
 
     # Extends parent implementation to also override the API URL. If no API

-- 
To view, visit https://gerrit.wikimedia.org/r/192356
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I041da78dfed0593a71d0239cc93e55a7889dfab6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: master
Gerrit-Owner: Dduvall <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to