tiny performance improvement

This commit is contained in:
Armin Ronacher 2010-07-12 23:58:43 +02:00
parent 5e1b1030e8
commit 6e52355eb3

View file

@ -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):