From 589ba5a84f6cdd7a71c94e378c61a4d5f39932be Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 24 Jun 2013 20:29:10 -0700 Subject: [PATCH] repoman: dedent generated repos.conf This fixes a "File contains no section headers" error raised by configparser with Python 2. --- bin/repoman | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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. -- 2.26.2