From c0c50318bd8ef6c8119ad9fdc53ad9087ded4c32 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Mon, 12 Sep 2016 17:21:34 +0200 Subject: [PATCH] python: Avoid Python3-only form of super(). * lang/python/pyme/core.py (GpgmeWrapper.__repr__): Use more compatible form of super. (GpgmeWrapper.__setattr__): Likewise. (Context.__init__): Likewise. (Data.__init__): Likewise. Signed-off-by: Justus Winter --- lang/python/pyme/core.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lang/python/pyme/core.py b/lang/python/pyme/core.py index f9df6e84..4bbbc170 100644 --- a/lang/python/pyme/core.py +++ b/lang/python/pyme/core.py @@ -45,7 +45,8 @@ class GpgmeWrapper(object): self.wrapped = wrapped def __repr__(self): - return '<{}/{!r}>'.format(super().__repr__(), self.wrapped) + return '<{}/{!r}>'.format(super(GpgmeWrapper, self).__repr__(), + self.wrapped) def __str__(self): acc = ['{}.{}'.format(__name__, self.__class__.__name__)] @@ -153,7 +154,7 @@ class GpgmeWrapper(object): if key in self._boolean_properties: self.__wrap_boolean_property(key, True, value) else: - super().__setattr__(key, value) + super(GpgmeWrapper, self).__setattr__(key, value) class Context(GpgmeWrapper): """Context for cryptographic operations @@ -191,7 +192,7 @@ class Context(GpgmeWrapper): wrapped = gpgme.gpgme_ctx_t_p_value(tmp) gpgme.delete_gpgme_ctx_t_p(tmp) self.own = True - super().__init__(wrapped) + super(Context, self).__init__(wrapped) self.armor = armor self.textmode = textmode self.offline = offline @@ -873,7 +874,7 @@ class Data(GpgmeWrapper): that file. """ - super().__init__(None) + super(Data, self).__init__(None) self.data_cbs = None if cbs != None: