pam: use a pam object method instead of pam module function
[cascardo/ipsilon.git] / ipsilon / providers / personaidp.py
index 74e19d3..2a28ba9 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2014  Ipsilon project Contributors, for licensee see COPYING
+# Copyright (C) 2014 Ipsilon project Contributors, for license see COPYING
 
 from __future__ import absolute_import
 
@@ -54,7 +54,6 @@ Provides Persona authentication infrastructure. """
         return self.get_config_value('allowed domains')
 
     def get_tree(self, site):
-        self.init_idp()
         self.page = Persona(site, self)
         # self.admin = AdminPage(site, self)
 
@@ -66,7 +65,7 @@ Provides Persona authentication infrastructure. """
             self.key = M2Crypto.RSA.load_key(self.idp_key_file,
                                              lambda *args: None)
         except Exception, e:  # pylint: disable=broad-except
-            self._debug('Failed to init Persona provider: %r' % e)
+            self.debug('Failed to init Persona provider: %r' % e)
             return None
 
     def on_enable(self):
@@ -85,7 +84,7 @@ class Installer(ProviderInstaller):
         group.add_argument('--persona', choices=['yes', 'no'], default='yes',
                            help='Configure Persona Provider')
 
-    def configure(self, opts):
+    def configure(self, opts, changes):
         if opts['persona'] != 'yes':
             return