summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-01 12:58:09 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-01 12:58:09 -0700
commitbe0d93bf2a5489ddf99bc260370016b2544dbe76 (patch)
tree3f5f20969023c3bbda91fa579810d2e3996dfc9a
parenta4e4a06df107dcf7b04a6747c5283641a190e91b (diff)
downloadportage-be0d93bf2a5489ddf99bc260370016b2544dbe76.tar.gz
portage-be0d93bf2a5489ddf99bc260370016b2544dbe76.tar.bz2
portage-be0d93bf2a5489ddf99bc260370016b2544dbe76.zip
Fix broken SafeConfigParser.Error reference.
-rw-r--r--pym/portage/repository/config.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 30daffb36..0c924e7d5 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -5,9 +5,9 @@ import codecs
import logging
try:
- from configparser import SafeConfigParser
+ from configparser import SafeConfigParser, ParsingError
except ImportError:
- from ConfigParser import SafeConfigParser
+ from ConfigParser import SafeConfigParser, ParsingError
from portage import os
from portage.const import USER_CONFIG_PATH, GLOBAL_CONFIG_PATH, REPO_NAME_LOC
from portage.env.loaders import KeyValuePairFileLoader
@@ -120,7 +120,7 @@ class RepoConfigLoader(object):
parser = SafeConfigParser()
try:
parser.read(paths)
- except SafeConfigParser.Error as e:
+ except ParsingError as e:
writemsg(_("!!! Error while reading repo config file: %s\n") % e, noiselevel=-1)
prepos['DEFAULT'] = RepoConfig("DEFAULT", parser.defaults())
for sname in parser.sections():