From 9b5bfcf9c86233483d72019870e050bd799d33a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Bokros?= Date: Mon, 27 Nov 2017 18:38:21 +0100 Subject: [PATCH] Adapt existing component examples to refactor --- src/components/component_example.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/component_example.py b/src/components/component_example.py index f53b672..74c06fc 100644 --- a/src/components/component_example.py +++ b/src/components/component_example.py @@ -1,25 +1,25 @@ import codecs +from component import Component from tornado.ioloop import IOLoop -from component import Component def echo_handler(data): return data -def rot13_handler(data): +def rot13_handler(data, *args): data['data'] = codecs.encode(data['data'], 'rot13') return data -def change_case_handler(data): +def change_case_handler(data, *args): data['data'] = data['data'].upper() if data['data'].islower() else data['data'].lower() return data -def reverse_handler(data): +def reverse_handler(data, *args): data['data'] = data['data'][::-1] return data