Import 'reduce' from functools

The reduce function is no longer a built-in in Python 3.
Importing it from functools works on both py2 and py3.

Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
Petr Viktorin 2015-07-30 17:49:16 +02:00 committed by Tomas Babej
parent 6a741b51da
commit 262faec70a

View File

@ -47,6 +47,7 @@ from ipapython.ipautil import ipa_generate_password, CheckedIPAddress
from ipapython.dnsutil import DNSName
from ipapython.ssh import SSHPublicKey
from ipapython.dn import DN
from functools import reduce
__doc__ = _("""
Hosts/Machines