Avoid builtins that were removed in Python 3

- `file` was removed in favor of `open`. Switch to the new spelling.
- `buffer` was removed in favor of a buffer protocol (and memoryview),
  and `reload` was moved to importlib.
  Both are used in py2-only blocks, so just placate PyLint.

https://fedorahosted.org/freeipa/ticket/5623

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Petr Viktorin
2016-01-05 13:57:51 +01:00
committed by Jan Cholasta
parent b2436560df
commit 06a678c159
3 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ if six.PY3:
unicode = str
if six.PY2:
reload(sys)
reload(sys) # pylint: disable=reload-builtin
sys.setdefaultencoding('utf-8') # pylint: disable=no-member
from ipalib import frontend