summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-04-30 12:47:28 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-04-30 12:47:28 (GMT)
commit3a09a75ce87c867c2f3efc1cf20ff1557cd0647d (patch)
tree9088f5e8399db278e36e6d1a00e4cafba8fa625a /utils
parentf502cf1e7d2c433fb11fc47e6f106ef612d43c57 (diff)
add check if automation/show id exist when generating log
Diffstat (limited to 'utils')
-rwxr-xr-xutils/rhrd-schedules11
1 files changed, 10 insertions, 1 deletions
diff --git a/utils/rhrd-schedules b/utils/rhrd-schedules
index b248e4d..7a83458 100755
--- a/utils/rhrd-schedules
+++ b/utils/rhrd-schedules
@@ -56,7 +56,16 @@ sub generate
next if ($start->year != $year || $start->month != $month || $start->day != $day);
if($showid < 0) {
- print "WARNING: skipping entry whith invalid/unset automation id -> $start: $title ($pvid)\n";
+ print "WARNING: skipping entry whith unset automation id -> $start: $title ($pvid)\n";
+ next;
+ }
+ my ($exists, $status, $errorstring) = RHRD::rddb::check_show_exists($ctx, $showid);
+ unless(defined $exists) {
+ print "$status: $errorstring\n";
+ return 1;
+ }
+ if($exists != 1) {
+ print "WARNING: skipping entry whith not existing automation id ($showid) -> $start: $title ($pvid)\n";
next;
}