Use intended format() method of translation object

Translation objects have support for format(). This allows to
get rid of unicode() which is deprecated in Python3.

Fixes: https://pagure.io/freeipa/issue/7586
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Stanislav Levin 2018-06-20 12:02:34 +03:00 committed by Christian Heimes
parent f4716b6991
commit 854597c411

View File

@ -1270,7 +1270,7 @@ class TrustDomainInstance(object):
ttype = trust_type_string(
res.info_ex.trust_type, res.info_ex.trust_attributes
)
err = unicode(msg).format(
err = msg.format(
ipa_domain=another_domain.info['dns_domain'],
trust_type=ttype)