commit:     1b2256106e368504b69e12514004d0e8a8e73b9b
Author:     Manuel RĂ¼ger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 30 13:43:44 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Mar 30 17:22:35 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=1b225610

FileNotFoundError is not defined in python2.7

Closes: https://github.com/gentoo/portage/pull/288
Fixes: 36fd0a505fe0 ("repoman: Add a new config.py file with config loading 
utilities")

 repoman/pym/repoman/config.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/repoman/pym/repoman/config.py b/repoman/pym/repoman/config.py
index 0f2358cd9..578bbccde 100644
--- a/repoman/pym/repoman/config.py
+++ b/repoman/pym/repoman/config.py
@@ -8,6 +8,11 @@ import stat
 
 import yaml
 
+try:
+       FileNotFoundError
+except NameError:
+       FileNotFoundError = EnvironmentError
+
 
 class ConfigError(Exception):
        """Raised when a config file fails to load"""

Reply via email to