Gentoo Archives: gentoo-commits

From: Paul Varner <fuzzyray@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/
Date: Mon, 25 Jul 2016 18:04:40
Message-Id: 1469469666.bc92540f8ce498e8305103619c7085b670ba19b1.fuzzyray@gentoo
1 commit: bc92540f8ce498e8305103619c7085b670ba19b1
2 Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 25 18:01:06 2016 +0000
4 Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 25 18:01:06 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=bc92540f
7
8 Add missing import of io.open when using python2.7
9
10 This fixes the traceback when running equery changes with Python 2.7
11
12 X-Gentoo-bug: 589686
13 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=589686
14
15 pym/gentoolkit/helpers.py | 3 +++
16 1 file changed, 3 insertions(+)
17
18 diff --git a/pym/gentoolkit/helpers.py b/pym/gentoolkit/helpers.py
19 index 0d985b6..8d25393 100644
20 --- a/pym/gentoolkit/helpers.py
21 +++ b/pym/gentoolkit/helpers.py
22 @@ -26,6 +26,9 @@ __docformat__ = 'epytext'
23 # =======
24
25 import os
26 +import sys
27 +if sys.hexversion < 0x3000000:
28 + from io import open
29 import re
30 from functools import partial
31 from itertools import chain