summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-11-07 10:24:51 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-11-07 10:24:51 +0100
commit6fcf4d3f96b8855172fbe12a7b4c1ddc14c35d33 (patch)
tree6c6e5fae122a90e99d5b167c37deee06e6c2c287 /index.pl
parent074cce7083a964c9b60295c1cea1986c7c598c6f (diff)
index: only call is_canceled if the backend module supports it
Diffstat (limited to 'index.pl')
-rw-r--r--index.pl8
1 files changed, 5 insertions, 3 deletions
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,
}
);
}