From fc4ccb808306ae63f799596769b5b7fdcdaf9640 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 9 Aug 2014 19:06:06 +0200 Subject: [PATCH] get rid of more app references --- oml/item/icons.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/oml/item/icons.py b/oml/item/icons.py index e5a70a1..47b985f 100644 --- a/oml/item/icons.py +++ b/oml/item/icons.py @@ -91,7 +91,7 @@ class Icons(dict): icons = Icons(icons_db_path) @run_async -def get_icon(app, id, type_, size, callback): +def get_icon(id, type_, size, callback): if size: skey = '%s:%s:%s' % (type_, id, size) data = icons[skey] @@ -120,7 +120,7 @@ def get_icon(app, id, type_, size, callback): callback(data) @run_async -def get_icon_app(app, id, type_, size, callback): +def get_icon_app(id, type_, size, callback): with db.session(): from item.models import Item item = Item.get(id) @@ -151,8 +151,8 @@ def get_icon_app(app, id, type_, size, callback): class IconHandler(tornado.web.RequestHandler): - def initialize(self, app): - self._app = app + def initialize(self): + pass @tornado.web.asynchronous @tornado.gen.coroutine @@ -166,7 +166,7 @@ class IconHandler(tornado.web.RequestHandler): self.set_header('Content-Type', 'image/jpeg') - response = yield tornado.gen.Task(get_icon, self._app, id, type_, size) + response = yield tornado.gen.Task(get_icon, id, type_, size) if not response: self.set_status(404) return