aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-11-10 12:58:09 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2007-11-10 12:58:09 +0000
commit8cf6ae03f0630a491eae3bcd17eba3d65f297042 (patch)
treefd63d35eb3c47c7e3b63d906030b5df75f3b50a0 /web
parentCache fun. (diff)
downloadpackages-8cf6ae03f0630a491eae3bcd17eba3d65f297042.tar.gz
packages-8cf6ae03f0630a491eae3bcd17eba3d65f297042.tar.bz2
packages-8cf6ae03f0630a491eae3bcd17eba3d65f297042.zip
Remove the pickle testing and workaround now that it is fixed.
Diffstat (limited to 'web')
-rw-r--r--web/model.py25
1 files changed, 1 insertions, 24 deletions
diff --git a/web/model.py b/web/model.py
index 529e97e..3360f66 100644
--- a/web/model.py
+++ b/web/model.py
@@ -19,24 +19,6 @@ import cherrypy
cache_package_details = {}
cache_package_keywords = {}
-# Exposes a bug in pkgcore.CPV!
-def pickle_test(val1):
- #import cPickle as pickle
- import pickle
- from cStringIO import StringIO
- #print 'val1=%s' % (val1, )
- file = StringIO()
- protocol = 0
- pickler = pickle.Pickler(file, protocol)
- pickler.dump(val1)
- buf = file.getvalue()
- #print 'pickle=%s' % (buf, )
- file = StringIO(buf)
- unpickler = pickle.Unpickler(file)
- val2 = unpickler.load()
- #print 'val1=%s' % (val1, )
- return val2
-
def absurl(path='', qs=None, script_name=None):
"""Better version of cherrypy.url. Generates absolute URLs."""
@@ -491,7 +473,6 @@ class PackageDB(object):
package_details = self.mc.get(cp)
if not package_details:
package_details = self._get_package_details(cat, pn)
- #package_details = pickle_test(package_details)
#print '%r' % (package_details, )
if self.mc and package_details:
self.mc.set(cp, package_details, time=300)
@@ -542,10 +523,7 @@ class PackageDB(object):
row = cursor.fetchone()
ebuildchangeutc = datetime.datetime.utcfromtimestamp(row[0])
- # Convert to CPV object after memcache
- # to work around pkgcore pickle bug
- #package_details = { 'atom': CPV(str(cp)),
- package_details = { 'atom': str(cp),
+ package_details = { 'atom': CPV(str(cp)),
'license': pkglicense,
'homepage': homepage,
'description': description,
@@ -568,7 +546,6 @@ class PackageDB(object):
package_keywords = self.mc.get(cp)
if not package_keywords:
package_keywords = self._get_package_keywords(query)
- #package_keywords = pickle_test(package_keywords)
if self.mc and package_keywords:
self.mc.set(cp, package_keywords, time=300)
return package_keywords