From: Zac Medico Date: Fri, 1 Oct 2010 19:58:09 +0000 (-0700) Subject: Fix broken SafeConfigParser.Error reference. X-Git-Tag: v2.2_rc90~57 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=be0d93bf2a5489ddf99bc260370016b2544dbe76;p=portage.git Fix broken SafeConfigParser.Error reference. --- 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():