[Freeipa-devel] [PATCHES] OTP Patches

Alexander Bokovoy abokovoy at redhat.com
Fri Feb 21 09:29:04 UTC 2014


On Thu, 20 Feb 2014, Nathaniel McCallum wrote:
>From ead3ef011667dadacfc817725179f38c05177a00 Mon Sep 17 00:00:00 2001
>From: Nathaniel McCallum <npmccallum at redhat.com>
>Date: Thu, 20 Feb 2014 13:20:01 -0500
>Subject: [PATCH 6/8] Fix a typo where self was omitted
>
>https://fedorahosted.org/freeipa/ticket/4099
>---
> ipalib/plugins/otptoken.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/ipalib/plugins/otptoken.py b/ipalib/plugins/otptoken.py
>index 77c17150d83f0562823698e1ad585ec523f16ad7..6b142989fd306472ede3e0a528fb103cd46fca77 100644
>--- a/ipalib/plugins/otptoken.py
>+++ b/ipalib/plugins/otptoken.py
>@@ -80,7 +80,7 @@ class OTPTokenKey(Bytes):
>             except TypeError, e:
>                 raise ConversionError(name=self.name, index=index, error=str(e))
> 
>-        return Bytes._convert_scalar(value, index)
>+        return Bytes._convert_scalar(self, value, index)
> 
> def _convert_owner(userobj, entry_attrs, options):
>     if 'ipatokenowner' in entry_attrs and not options.get('raw', False):
NACK, it should use super() instead:

     return super(OTPTokenKey, self)._convert_scalar(value, index)

see ipalib/parameters.py:1369 as an example.

-- 
/ Alexander Bokovoy




More information about the Freeipa-devel mailing list