commit:     51eed5033771a58cb3e6c7952440c1a3e35416c7
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  5 19:39:48 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Apr  5 19:43:26 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=51eed503

repoman.modules.scan.module.ModuleConfig: pass stream to safe_load

The yaml.safe_load() documentation says that the argument should
be a stream rather than a string.

Reported-by: Michał Górny <mgorny <AT> gentoo.org>

 repoman/pym/repoman/modules/scan/module.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/repoman/pym/repoman/modules/scan/module.py 
b/repoman/pym/repoman/modules/scan/module.py
index 8a7a53638..baed68989 100644
--- a/repoman/pym/repoman/modules/scan/module.py
+++ b/repoman/pym/repoman/modules/scan/module.py
@@ -69,7 +69,7 @@ class ModuleConfig(object):
                        if os.path.exists(path):
                                try:
                                        with open(path, 'r') as inputfile:
-                                               
configs.append(yaml.safe_load(inputfile.read()))
+                                               
configs.append(yaml.safe_load(inputfile))
                                except IOError as error:
                                        logging,error("Failed to load file: 
%s", inputfile)
                                        logging.exception(error)

Reply via email to