summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-18 22:37:45 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-18 22:37:45 +0000
commita97d1cc4a60bf137ec445b87f90ed9a8bff5ed5f (patch)
treee305d80c9cbe57ebe9e6bbea24f681197ed0ebc9
parent3f40153497a8a623f595290dd30859276ab1fb4c (diff)
downloadportage-a97d1cc4a60bf137ec445b87f90ed9a8bff5ed5f.tar.gz
portage-a97d1cc4a60bf137ec445b87f90ed9a8bff5ed5f.tar.bz2
portage-a97d1cc4a60bf137ec445b87f90ed9a8bff5ed5f.zip
Fall back to pickle if cPickle is unavailable. Thanks to Michael Haubenwallner <michael.haubenwallner@salomon.at> for reporting.
svn path=/main/trunk/; revision=6552
-rw-r--r--pym/portage/dbapi/vartree.py6
1 files changed, 5 insertions, 1 deletions
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 """