[Pkg-gnupg-commit] [gpgme] 337/412: python: Avoid Python3-only form of super().

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Sep 22 21:27:15 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gpgme.

commit c0c50318bd8ef6c8119ad9fdc53ad9087ded4c32
Author: Justus Winter <justus at g10code.com>
Date:   Mon Sep 12 17:21:34 2016 +0200

    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 <justus at g10code.com>
---
 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 f9df6e8..4bbbc17 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:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git



More information about the Pkg-gnupg-commit mailing list