From 253ce79328470b7b20e676be350fa4ff5bfc3513 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 18 Jun 2013 20:57:52 -0700 Subject: [PATCH] RepoConfigLoader: handle configparser.Error --- pym/portage/repository/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 444e6a7f3..ba9f7ffb2 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -10,13 +10,13 @@ import sys import re try: - from configparser import ParsingError + from configparser import Error as ConfigParserError if sys.hexversion >= 0x3020000: from configparser import ConfigParser as SafeConfigParser else: from configparser import SafeConfigParser except ImportError: - from ConfigParser import SafeConfigParser, ParsingError + from ConfigParser import SafeConfigParser, Error as ConfigParserError import portage from portage import eclass_cache, os from portage.const import (MANIFEST2_HASH_FUNCTIONS, MANIFEST2_REQUIRED_HASH, @@ -473,7 +473,7 @@ class RepoConfigLoader(object): kwargs = {source_kwarg: p} try: read_file(f, **portage._native_kwargs(kwargs)) - except ParsingError as e: + except ConfigParserError as e: writemsg( _("!!! Error while reading repo config file: %s\n") % e, noiselevel=-1) -- 2.26.2