@@ -76,19 +76,20 @@ the pathname of the log itself."
76
76
77
77
(defun daily-split-hourly-logs ()
78
78
(let ((logs (hourly-logs)) day-logs log-list)
79
- (loop
80
- :with day = (this-day (car (first logs)))
81
- :for log :in logs
82
- :if (= (this-day (car log )) day)
83
- :do (push log day-logs)
84
- :else :do
85
- (push (nreverse day-logs) log-list)
86
- (setf day-logs nil )
87
- (setf day (this-day (car log )))
88
- (push log day-logs))
89
- (when day-logs
90
- (push (nreverse day-logs) log-list))
91
- log-list))
79
+ (when logs
80
+ (loop
81
+ :with day = (this-day (car (first logs)))
82
+ :for log :in logs
83
+ :if (= (this-day (car log )) day)
84
+ :do (push log day-logs)
85
+ :else :do
86
+ (push (nreverse day-logs) log-list)
87
+ (setf day-logs nil )
88
+ (setf day (this-day (car log )))
89
+ (push log day-logs))
90
+ (when day-logs
91
+ (push (nreverse day-logs) log-list))
92
+ log-list)))
92
93
93
94
(defun print-hourly-list ()
94
95
" Print out the hourly log list HTML, with newest logs first."
@@ -98,7 +99,8 @@ the pathname of the log itself."
98
99
(:h2 " Hourly Report Listing" )
99
100
(let ((daily-logs (daily-split-hourly-logs)))
100
101
(when (null daily-logs)
101
- (htm (:br ) " No hourly reports available!" ))
102
+ (htm (:br ) " No hourly reports available!" )
103
+ (return-from print-hourly-list nil ))
102
104
103
105
(dolist (logs daily-logs)
104
106
(let ((log-day (this-day (car (first logs)))))
0 commit comments