diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-02-22 05:23:34 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-02-22 05:23:34 +0000 |
commit | 27eb5504f6886038d9d427385411715cd0b96d9c (patch) | |
tree | 5f59318f85c32c952a763a23065b4e7b70e62225 /pym/portage/data.py | |
parent | 24c616a42162793e6bdcda5544a2955a27c4821e (diff) | |
download | portage-27eb5504f6886038d9d427385411715cd0b96d9c.tar.gz portage-27eb5504f6886038d9d427385411715cd0b96d9c.tar.bz2 portage-27eb5504f6886038d9d427385411715cd0b96d9c.zip |
Use lazyimport to avoid importing the dep, output, update, and versions
modules when portage is initially imported.
svn path=/main/trunk/; revision=12681
Diffstat (limited to 'pym/portage/data.py')
-rw-r--r-- | pym/portage/data.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/pym/portage/data.py b/pym/portage/data.py index a8ddf8250..3ae286b34 100644 --- a/pym/portage/data.py +++ b/pym/portage/data.py @@ -7,13 +7,10 @@ import os, sys, pwd, grp, platform import portage portage.proxy.lazyimport.lazyimport(globals(), + 'portage.output:colorize', 'portage.util:writemsg', ) -from portage.output import colorize -from portage.output import create_color_func -bad = create_color_func("BAD") - ostype=platform.system() userland = None if ostype == "DragonFly" or ostype.endswith("BSD"): @@ -39,7 +36,7 @@ if not lchown: lchown() def portage_group_warning(): - warn_prefix = bad("*** WARNING *** ") + warn_prefix = colorize("BAD", "*** WARNING *** ") mylines = [ "For security reasons, only system administrators should be", "allowed in the portage group. Untrusted users or processes", |