From 9d64e4c8e142b0e66da6fe01959b4f2d36a9a4cb Mon Sep 17 00:00:00 2001 From: Brian Harring Date: Fri, 22 Jul 2005 23:27:42 +0000 Subject: cleanup --- portage/const.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'portage') diff --git a/portage/const.py b/portage/const.py index a3ee6f6..0ce1c4c 100644 --- a/portage/const.py +++ b/portage/const.py @@ -1,8 +1,8 @@ # portage: Constants # Copyright 1998-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/portage/const.py,v 1.2 2005/07/21 19:50:17 ferringb Exp $ -cvs_id_string="$Id: const.py,v 1.2 2005/07/21 19:50:17 ferringb Exp $"[5:-2] +# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/portage/const.py,v 1.3 2005/07/22 23:27:42 ferringb Exp $ +cvs_id_string="$Id: const.py,v 1.3 2005/07/22 23:27:42 ferringb Exp $"[5:-2] # note this is lifted out of portage 2. so... it's held onto for the sake of having stuff we still need, # but it does need cleanup. @@ -17,14 +17,13 @@ USER_CONFIG_PATH = "/etc/portage" #PORTAGE_BASE_PATH = "/usr/lib/portage" try: import portage_custom_path - PORTAGE_BASE_PATH = portage_custom_path.PORTAGE_BASE_PATH -except ImportError: +except (ImportError, AttributeError): portage_custom_path = None print "warning, can't find portage_custom_path. which means no custom PORTAGE_BASE_PATH" print "so... that means you're getting /home/bharring/new/ , which quite likely isn't what you want" - PORTAGE_BASE_PATH = "/home/bharring/new" +PORTAGE_BASE_PATH = getattr(portage_custom_path, "PORTAGE_BASE_PATH", "/usr/lib/portage/") PORTAGE_BIN_PATH = getattr(portage_custom_path, "PORTAGE_BIN_PATH", PORTAGE_BASE_PATH+"/bin") DEFAULT_CONF_FILE = getattr(portage_custom_path, "DEFAULT_CONF_FILE", USER_CONFIG_PATH+"/config") CONF_DEFAULTS = getattr(portage_custom_path, "CONF_DEFAULTS", PORTAGE_BASE_PATH+"/conf_default_types") -- cgit v1.2.3-65-gdbad