From: Zac Medico Date: Tue, 25 Jun 2013 03:29:10 +0000 (-0700) Subject: repoman: dedent generated repos.conf X-Git-Tag: v2.2.0_alpha186~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=589ba5a84f6cdd7a71c94e378c61a4d5f39932be;p=portage.git repoman: dedent generated repos.conf This fixes a "File contains no section headers" error raised by configparser with Python 2. --- diff --git a/bin/repoman b/bin/repoman index 610744910..2a3b4f30f 100755 --- a/bin/repoman +++ b/bin/repoman @@ -590,10 +590,10 @@ except KeyError: if layout_conf_data['repo-name']: repo_name = layout_conf_data['repo-name'] repos_conf_file = os.path.join(repoman_settings["PORTAGE_CONFIGROOT"], portage.const.USER_CONFIG_PATH, "repos.conf") - tmp_conf_file = io.StringIO(""" + tmp_conf_file = io.StringIO(textwrap.dedent(""" [%s] location = %s - """ % (repo_name, portdir_overlay)) + """) % (repo_name, portdir_overlay)) repositories = portage.repository.config.RepoConfigLoader([repos_conf_file, tmp_conf_file], repoman_settings) # We have to call the config constructor again so that attributes # dependent on config.repositories are initialized correctly.