Do not use __builtin__ in python3

__builtin__ does not exist in Python 3, use
six.moves.builtins instead.

Change-Id: I79b61b5ab67f491ce88015f799ff7d66c9eeb7ee
closes-bug: #1290234
This commit is contained in:
yangxurong 2014-03-13 10:00:11 +08:00
parent 287fe8478a
commit daf7998996
3 changed files with 3 additions and 4 deletions

View File

@ -30,5 +30,5 @@ eventlet.monkey_patch(os=False)
# See http://code.google.com/p/python-nose/issues/detail?id=373
# The code below enables nosetests to work with i18n _() blocks
import __builtin__
import six.moves.builtins as __builtin__
setattr(__builtin__, '_', lambda x: x)

View File

@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import __builtin__
import errno
import hashlib
import os
@ -25,6 +24,7 @@ import mock
import netaddr
from oslo.config import cfg
import six
import six.moves.builtins as __builtin__
from ironic.common import exception
from ironic.common import utils

View File

@ -7,9 +7,8 @@
__all__ = ['main']
import __builtin__ as builtins
import sys
import six.moves.builtins as builtins
import pyflakes.api
from pyflakes import checker