Commits

Carlos Daniel Ruvalcaba Valenzuela committed 44bc72a

Cleaned code to don't assume that cache has a get function, only minimal dict like interface.

Comments (0)

Files changed (1)

tgext/coffeescript/middleware.py

             start_response('304 Not Modified', (('ETag', etag_key),))
             return ['']
 
-        cached = self.cache.get(path)
+        try:
+            cached = self.cache[path]
+        except KeyError:
+            cached = None
+            
         if not cached or cached['etag_key'] != etag_key:
             content = self.compile(full_path)
             if self.minify: