From f95d917258f4bf9d56f20588b6dab5f5d1e0cc40 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 3 Jun 2011 17:01:13 -0700 Subject: [PATCH] Move pickle import out of base portage module. --- pym/portage/__init__.py | 4 ---- pym/portage/util/__init__.py | 2 +- pym/portage/util/mtimedb.py | 6 +++++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 9732a74b1..1b96dab58 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -17,10 +17,6 @@ try: errno.ESTALE = -1 import re import types - try: - import cPickle as pickle - except ImportError: - import pickle try: from subprocess import getstatusoutput as subprocess_getstatusoutput diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py index 138553a16..28e9428d9 100644 --- a/pym/portage/util/__init__.py +++ b/pym/portage/util/__init__.py @@ -28,12 +28,12 @@ import traceback import portage portage.proxy.lazyimport.lazyimport(globals(), + 'pickle', 'portage.dep:Atom', 'portage.util.listdir:_ignorecvs_dirs' ) from portage import StringIO from portage import os -from portage import pickle from portage import subprocess_getstatusoutput from portage import _encodings from portage import _os_merge diff --git a/pym/portage/util/mtimedb.py b/pym/portage/util/mtimedb.py index 175bd8f46..571fe5a30 100644 --- a/pym/portage/util/mtimedb.py +++ b/pym/portage/util/mtimedb.py @@ -4,9 +4,13 @@ __all__ = ['MtimeDB'] import copy +try: + import cPickle as pickle +except ImportError: + import pickle import portage -from portage import pickle, _unicode_encode +from portage import _unicode_encode from portage.data import portage_gid, uid from portage.localization import _ from portage.util import apply_secpass_permissions, atomic_ofstream, writemsg -- 2.26.2