From 19a783ca04cf4e6a222bcfd89705741cdf24af1e Mon Sep 17 00:00:00 2001 From: Oleg Zharkov Date: Fri, 23 Oct 2020 13:16:25 +0200 Subject: [PATCH] remove if condition --- lib/galaxy/webapps/galaxy/api/authenticate.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/api/authenticate.py b/lib/galaxy/webapps/galaxy/api/authenticate.py index 475347957dd..ac29256dce0 100644 --- a/lib/galaxy/webapps/galaxy/api/authenticate.py +++ b/lib/galaxy/webapps/galaxy/api/authenticate.py @@ -95,10 +95,8 @@ class AuthenticationController(BaseAPIController): try: split = encoded_str.strip().split(' ') except AttributeError: - if not encoded_str: - raise exceptions.RequestParameterInvalidException('Authentication is missing') - else: - raise exceptions.MessageException('Failed to authenticate') + raise exceptions.RequestParameterInvalidException('Authentication is missing') + # If split is only one element, try to decode the email and password # directly.