You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2020/02/02 14:16:40 UTC

[whimsy] branch master updated: Nope out if /srv/subscriptions doesn't exist

This is an automated email from the ASF dual-hosted git repository.

rubys 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 3cd5ad1  Nope out if /srv/subscriptions doesn't exist
     new 77bc388  Merge branch 'master' of github.com:apache/whimsy
3cd5ad1 is described below

commit 3cd5ad173db7fe19def1073f10519584212f26ff
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sun Feb 2 09:15:53 2020 -0500

    Nope out if /srv/subscriptions doesn't exist
---
 lib/whimsy/asf/mlist.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/whimsy/asf/mlist.rb b/lib/whimsy/asf/mlist.rb
index f420e6c..78635a6 100644
--- a/lib/whimsy/asf/mlist.rb
+++ b/lib/whimsy/asf/mlist.rb
@@ -40,6 +40,7 @@ module ASF
     # pmc can either be a pmc name, in which case it uses private@<pmc>.apache.org
     # or it can be an ASF list name, e.g. w3c@apache.org
     def self.private_subscribers(pmc, archivers=false)
+      return [] unless Dir.exists? LIST_BASE
       parts = pmc.split('@', 3) # want to detect trailing '@'
       if parts.length == 1
         return list_filter('sub', "#{pmc}.apache.org", 'private', archivers), (File.mtime(LIST_TIME) rescue File.mtime(LIST_SUBS))
@@ -51,6 +52,7 @@ module ASF
     end
 
     def self.security_subscribers(pmc, archivers=false)
+      return [] unless Dir.exists? LIST_BASE
       return list_filter('sub', "#{pmc}.apache.org", 'security', archivers), (File.mtime(LIST_TIME) rescue File.mtime(LIST_SUBS))
     end