whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/2] Commit 58d35ae: complain if site information can't be found
Date Sun, 14 Feb 2016 11:43:52 GMT
Commit 58d35ae898aaa2c0ebe12d9997fa0fd00ed7071a:
    complain if site information can't be found


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
lib/whimsy/asf/site.rb                                       | ++++ 
------------------------------------------------------------
4 changes: 4 additions, 0 deletions.
------------------------------------------------------------


diff --git a/lib/whimsy/asf/site.rb b/lib/whimsy/asf/site.rb
index 70d4599..1afc780 100644
--- a/lib/whimsy/asf/site.rb
+++ b/lib/whimsy/asf/site.rb
@@ -52,6 +52,10 @@ class Site
     def self.list
       templates = ASF::SVN['asf/infrastructure/site/trunk/content']
       file = "#{templates}/index.html"
+      if not File.exist?(file)
+        Wunderbar.warn "Unable to find 'infrastructure/site/trunk/content'"
+        return {}
+      end
       return @@list if not @@list.empty? and File.mtime(file) == @@mtime
       @@mtime = File.mtime(file)
 

Mime
View raw message