Fall back to pickle if cPickle is unavailable. Thanks to Michael Haubenwallner ...
authorZac Medico <zmedico@gentoo.org>
Fri, 18 May 2007 22:37:45 +0000 (22:37 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 18 May 2007 22:37:45 +0000 (22:37 -0000)
svn path=/main/trunk/; revision=6552

pym/portage/dbapi/vartree.py

index e9f2cf5385f6f548b030a9b3026c280c3417f226..d438cbee029374592102f37c466450aae9755a2f 100644 (file)
@@ -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 """