From 35f28bac5ca8f231a082f2fa3b55743ab51cf33e Mon Sep 17 00:00:00 2001 From: "tilde.town" Date: Sun, 9 Nov 2014 00:35:01 +0000 Subject: [PATCH] stuff --- scripts/userlist.hy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/userlist.hy b/scripts/userlist.hy index 621cfa6..9ca81e5 100644 --- a/scripts/userlist.hy +++ b/scripts/userlist.hy @@ -8,7 +8,10 @@ (def timestamp (.strftime (.now datetime) "%Y-%m-%d %H:%M:%S")) (defn slurp [filename] - (.read (apply open [filename "r"] {"encoding" "utf-8"}))) + (try + (.read (apply open [filename "r"] {"encoding" "utf-8"})) + (catch [e Exception] + ""))) (def default-html (slurp "/etc/skel/public_html/index.html")) @@ -22,7 +25,7 @@ (def user-list (->> (listdir "/home") sorted - (filter (fn [f] (not (= f "ubuntu")))) + (filter (fn [f] (and (not (= f "ubuntu")) (not (= f "poetry"))))) (map dir->html) (.join "\n")))