From: Zac Medico Date: Fri, 18 May 2007 22:37:45 +0000 (-0000) Subject: Fall back to pickle if cPickle is unavailable. Thanks to Michael Haubenwallner ... X-Git-Tag: v2.2_pre1~1413 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a97d1cc4a60bf137ec445b87f90ed9a8bff5ed5f;p=portage.git Fall back to pickle if cPickle is unavailable. Thanks to Michael Haubenwallner for reporting. svn path=/main/trunk/; revision=6552 --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index e9f2cf538..d438cbee0 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -20,9 +20,13 @@ from portage import listdir, dep_expand, config, flatten, key_expand, \ doebuild_environment, doebuild, env_update, dircache, \ abssymlink, movefile, bsd_chflags -import os, sys, stat, cPickle, errno, commands, copy, time +import os, sys, stat, errno, commands, copy, time from itertools import izip +try: + import cPickle +except ImportError: + import pickle as cPickle class PreservedLibsRegistry(object): """ This class handles the tracking of preserved library objects """