Use six.moves.reduce instead of builtin reduce
Builtin function 'reduce' in Python 2 has been moved to standard library module in Python 3 [1]. To make code compatible, we should replace reduce(expr) with six.moves.reduce(expr) [1] http://python3porting.com/stdlib.html#moved-builtins Change-Id: Idca3420918471c41548a871d043fafc983aa7ee6 Closes-Bug: #1530249
This commit is contained in:
parent
5372220afd
commit
9ae3d53a8d
@ -22,6 +22,7 @@ import uuid
|
||||
import mock
|
||||
# NOTE(jokke): simplified transition to py3, behaves like py2 xrange
|
||||
from six.moves import range
|
||||
from six.moves import reduce
|
||||
|
||||
from glance.common import exception
|
||||
from glance.common import timeutils
|
||||
|
Loading…
Reference in New Issue
Block a user