~paul-stanley/endroid/muc-fixes

« back to all changes in this revision

Viewing changes to src/endroid/plugins/httpinterface.py

  • Committer: Tarmac
  • Author(s): Chris Davidson, Chris Davidson
  • Date: 2014-09-10 14:01:01 UTC
  • mfrom: (77.16.19 end-bug-mu)
  • Revision ID: tarmac-20140910140101-36ekmk6vun5u1fa6
SMS plugin fixes, config file cleanup and other assorted cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
190
190
 
191
191
    def endroid_init(self, pluginmanager, port, interface, media_dir,
192
192
                     template_dir, credplugins):
 
193
        """
 
194
        credplugins is a list of strings or objects
 
195
        """
193
196
        def _get_cred(plugin):
194
197
            """
195
198
            Get a credential checker for one entry in the credplugins list.
 
199
 
 
200
            'plugin' might be an object or a string representing the name of
 
201
            a plugin.
 
202
 
196
203
            """
 
204
 
197
205
            logging.info("Getting credentials from plugin {}".format(plugin))
198
206
            try:
199
207
                cred = plugin.http_cred_checker()
200
208
            except Exception as e:
201
 
                logging.exception(e)
 
209
                # Plugin was probably a string, try finding a plugin of that 
 
210
                # name
202
211
                try:
203
212
                    cred = pluginmanager.get(plugin).http_cred_checker()
204
213
                except Exception as e: