From 57de4f9b44bdf282e8f64783c6501dfef4eecfe0 Mon Sep 17 00:00:00 2001 From: Evelyn Date: Thu, 14 Jul 2016 00:35:11 +0100 Subject: [PATCH 1/2] Change tflsearch no result message --- modules/tfl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tfl.py b/modules/tfl.py index 7572d1ba..0123014f 100644 --- a/modules/tfl.py +++ b/modules/tfl.py @@ -140,4 +140,4 @@ class Module(object): results = ["%s (%s): %s" % (stop["name"], ", ".join(stop["modes"]), stop["id"]) for stop in stop_search["matches"]] event["stdout"].write("; ".join(results)) else: - event["stderr"].write("Stop not found") + event["stderr"].write("No results") From 068011b7a2cbcfb22e04c0e15ca34f62f37accf8 Mon Sep 17 00:00:00 2001 From: Evelyn Date: Thu, 14 Jul 2016 00:40:51 +0100 Subject: [PATCH 2/2] Add proper no result message --- modules/tfl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/tfl.py b/modules/tfl.py index 0123014f..f10ed899 100644 --- a/modules/tfl.py +++ b/modules/tfl.py @@ -139,5 +139,7 @@ class Module(object): print(stop) results = ["%s (%s): %s" % (stop["name"], ", ".join(stop["modes"]), stop["id"]) for stop in stop_search["matches"]] event["stdout"].write("; ".join(results)) + if not results: + event["stderr"].write("No results") else: event["stderr"].write("No results")