Merge pull request #726 from nyov/fix

some cosmetics
This commit is contained in:
Daniel Graña 2014-06-03 09:44:09 -03:00
commit 21df09d809
2 changed files with 4 additions and 4 deletions

View File

@ -108,8 +108,8 @@ class RFC2616Policy(object):
request.headers['If-None-Match'] = cachedresponse.headers['ETag']
def _compute_freshness_lifetime(self, response, request, now):
# Reference nsHttpResponseHead::ComputeFresshnessLifetime
# http://dxr.mozilla.org/mozilla-central/netwerk/protocol/http/nsHttpResponseHead.cpp.html#l259
# Reference nsHttpResponseHead::ComputeFreshnessLifetime
# http://dxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/nsHttpResponseHead.cpp#410
cc = self._parse_cachecontrol(response)
if 'max-age' in cc:
try:
@ -142,7 +142,7 @@ class RFC2616Policy(object):
def _compute_current_age(self, response, request, now):
# Reference nsHttpResponseHead::ComputeCurrentAge
# http://dxr.mozilla.org/mozilla-central/netwerk/protocol/http/nsHttpResponseHead.cpp.html
# http://dxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/nsHttpResponseHead.cpp#366
currentage = 0
# If Date header is not set we assume it is a fast connection, and
# clock is in sync with the server

View File

@ -30,7 +30,7 @@ class ItemMeta(type):
else:
new_attrs[n] = v
cls = type.__new__(mcs, class_name, bases, new_attrs)
cls = super(ItemMeta, mcs).__new__(mcs, class_name, bases, new_attrs)
cls.fields = cls.fields.copy()
cls.fields.update(fields)
return cls