whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: No need for empty auth array
Date Mon, 29 Jun 2020 15:41:24 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 6a546fc  No need for empty auth array
6a546fc is described below

commit 6a546fc3d6496f21f6f42cef10c5c8b7e4f0745a
Author: Sebb <sebb@apache.org>
AuthorDate: Mon Jun 29 16:41:13 2020 +0100

    No need for empty auth array
---
 www/board/agenda/models/agenda.rb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/www/board/agenda/models/agenda.rb b/www/board/agenda/models/agenda.rb
index 291fb45..7324ff8 100755
--- a/www/board/agenda/models/agenda.rb
+++ b/www/board/agenda/models/agenda.rb
@@ -139,10 +139,8 @@ class Agenda
     #extract context from block
     _, env = eval('[_, env]', block.binding)
 
-    if env.password
-      auth ||= [['--username', env.user, '--password', env.password]]
-    else
-      auth ||= [[]]
+    if (not auth) and env.password
+      auth = [['--username', env.user, '--password', env.password]]
     end
 
     file.untaint if file =~ /\Aboard_\w+_[\d_]+\.txt\z/


Mime
View raw message