Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin
[mediagoblin.git] / mediagoblin / staticdirect.py
index 5817588158f303724a14a31ce6cfedbcd71aa947..c6d2b3745b35c6bb1721731d0b2f0900958aeb6b 100644 (file)
@@ -21,24 +21,24 @@ import urlparse
 # Staticdirect infrastructure.
 # Borrowed largely from cc.engine
 # by Chris Webber & Creative Commons
-# 
+#
 # This needs documentation!
 ####################################
 
 import pkg_resources
 import urlparse
 
+
 class StaticDirect(object):
     def __init__(self):
         self.cache = {}
 
     def __call__(self, filepath):
-        if self.cache.has_key(filepath):
+        if filepath in self.cache:
             return self.cache[filepath]
 
         static_direction = self.cache[filepath] = self.get(filepath)
         return static_direction
-        
 
     def get(self, filepath):
         # should be implemented by the individual staticdirector