From 6fcf4d3f96b8855172fbe12a7b4c1ddc14c35d33 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 7 Nov 2014 10:24:51 +0100 Subject: index: only call is_canceled if the backend module supports it --- index.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'index.pl') diff --git a/index.pl b/index.pl index ad17284..55a0017 100644 --- a/index.pl +++ b/index.pl @@ -253,9 +253,11 @@ sub handle_request { destination => $result->destination, platform => $platform, info => $info, - is_cancelled => $result->is_cancelled, - moreinfo => $moreinfo, - delay => $delay, + is_cancelled => $result->can('is_canceled') + ? $result->is_cancelled + : undef, + moreinfo => $moreinfo, + delay => $delay, } ); } -- cgit v1.2.3