From 6e52355eb303e1b47f7b83ddbb94ff432e2df139 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 12 Jul 2010 23:58:43 +0200 Subject: [PATCH] tiny performance improvement --- flask/wrappers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flask/wrappers.py b/flask/wrappers.py index 200e7caf..b0747564 100644 --- a/flask/wrappers.py +++ b/flask/wrappers.py @@ -54,8 +54,8 @@ class Request(RequestBase): @property def module(self): """The name of the current module""" - if self.endpoint and '.' in self.endpoint: - return self.endpoint.rsplit('.', 1)[0] + if self.url_rule and '.' in self.url_rule.endpoint: + return self.url_rule.endpoint.rsplit('.', 1)[0] @cached_property def json(self):