From e8fbe2dea23974e98e9c3687834850ba626a7d97 Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Fri, 24 Jan 2014 14:53:40 -0500 Subject: [PATCH] Don't die when calendars aren't readable, rather, just tell conky to display why no calendar is there. --- calendar-export.plx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/calendar-export.plx b/calendar-export.plx index 0999577..056b7e4 100755 --- a/calendar-export.plx +++ b/calendar-export.plx @@ -570,11 +570,14 @@ if (defined $config->{cleanOutputDirFirst} and $config->{cleanOutputDirFirst}) { DieLog("$CONFIG_FILE doesn't specify a (readable) output directory via outputDir setting: $!") unless defined $config->{outputDir} and -d $config->{outputDir}; - -DieLog("$CONFIG_FILE doesn't specify a readable public nor a private diary file") - unless (defined $config->{publicDiary} and -r $config->{publicDiary}) or - (defined $config->{privateyDiary} and -r $config->{privateDiary}); - +unless ((defined $config->{publicDiary} and -r $config->{publicDiary}) or + (defined $config->{privateyDiary} and -r $config->{privateDiary})) { + foreach my $key (qw/publicDiary privateDiary/) { + print "\${color5}$key file, $config->{$key} does not exist\n" + if defined $config->{$key} + } + exit 0; +} FilterEmacsToICal($config->{publicDiary}, $config->{privateDiary}, $config->{outputDir}, $config, $config->{user});