Minor fixes for pep and style

This commit is contained in:
Alfonso de la Guarda Reyes
2013-10-05 08:03:50 -05:00
parent cd957cf52b
commit 5679661914

View File

@@ -19,7 +19,6 @@ When web2py is running on Google App Engine,
caching will be provided by the GAE memcache
(see gluon.contrib.gae_memcache)
"""
import traceback
import time
import portalocker
import shelve
@@ -278,7 +277,7 @@ class CacheOnDisk(CacheAbstract):
storage = shelve.open(self.shelve_name)
except:
logger.error('corrupted cache file %s, will try rebuild it'
% (self.shelve_name))
% self.shelve_name)
storage = None
if not storage and os.path.exists(self.shelve_name):
os.unlink(self.shelve_name)
@@ -479,7 +478,6 @@ class Cache(object):
if not session_ and public_:
cache_control += ', public'
expires = (current.request.utcnow + datetime.timedelta(seconds=time_expire)).strftime('%a, %d %b %Y %H:%M:%S GMT')
vary = None
else:
cache_control += ', private'
expires = 'Fri, 01 Jan 1990 00:00:00 GMT'