diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2012-01-10 08:12:30 -0600 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2012-01-10 08:12:30 -0600 |
commit | 73079ac4b8a8b3b355867a1e98aca63313597ad0 (patch) | |
tree | 614424e7222f81a29f82e580f5dc97baebffb1f6 /mediagoblin/staticdirect.py | |
parent | 1df68a3524d92caee5601a8acc011ac8e1fe16d4 (diff) | |
parent | 914b8bcde3e01c2dd3e5679fb7733fc194b34d68 (diff) | |
download | mediagoblin-73079ac4b8a8b3b355867a1e98aca63313597ad0.tar.lz mediagoblin-73079ac4b8a8b3b355867a1e98aca63313597ad0.tar.xz mediagoblin-73079ac4b8a8b3b355867a1e98aca63313597ad0.zip |
Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin
Conflicts:
mediagoblin/db/mongo/models.py
Diffstat (limited to 'mediagoblin/staticdirect.py')
-rw-r--r-- | mediagoblin/staticdirect.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mediagoblin/staticdirect.py b/mediagoblin/staticdirect.py index c6d2b374..2bddb160 100644 --- a/mediagoblin/staticdirect.py +++ b/mediagoblin/staticdirect.py @@ -14,9 +14,6 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import pkg_resources -import urlparse - #################################### # Staticdirect infrastructure. # Borrowed largely from cc.engine @@ -26,7 +23,9 @@ import urlparse #################################### import pkg_resources -import urlparse +import logging + +_log = logging.getLogger(__name__) class StaticDirect(object): @@ -37,6 +36,10 @@ class StaticDirect(object): if filepath in self.cache: return self.cache[filepath] + if not pkg_resources.resource_exists('mediagoblin', + 'static' + filepath): + _log.info("StaticDirect resource %r not found locally", + filepath) static_direction = self.cache[filepath] = self.get(filepath) return static_direction |