1 |
commit: 1b2256106e368504b69e12514004d0e8a8e73b9b |
2 |
Author: Manuel RĂ¼ger <mrueg <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 30 13:43:44 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 30 17:22:35 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1b225610 |
7 |
|
8 |
FileNotFoundError is not defined in python2.7 |
9 |
|
10 |
Closes: https://github.com/gentoo/portage/pull/288 |
11 |
Fixes: 36fd0a505fe0 ("repoman: Add a new config.py file with config loading utilities") |
12 |
|
13 |
repoman/pym/repoman/config.py | 5 +++++ |
14 |
1 file changed, 5 insertions(+) |
15 |
|
16 |
diff --git a/repoman/pym/repoman/config.py b/repoman/pym/repoman/config.py |
17 |
index 0f2358cd9..578bbccde 100644 |
18 |
--- a/repoman/pym/repoman/config.py |
19 |
+++ b/repoman/pym/repoman/config.py |
20 |
@@ -8,6 +8,11 @@ import stat |
21 |
|
22 |
import yaml |
23 |
|
24 |
+try: |
25 |
+ FileNotFoundError |
26 |
+except NameError: |
27 |
+ FileNotFoundError = EnvironmentError |
28 |
+ |
29 |
|
30 |
class ConfigError(Exception): |
31 |
"""Raised when a config file fails to load""" |