using a class method is cleaner

This commit is contained in:
Felix Van der Jeugt 2015-11-03 22:52:32 +01:00
parent a923572341
commit 0233423d9a

View File

@ -51,11 +51,11 @@ class QuteSchemeHandler(schemehandler.SchemeHandler):
handlers = dict()
@staticmethod
def addHandler(name):
@classmethod
def addHandler(cls, name):
"""Add a handler to the qute: sheme."""
def namedecorator(function):
QuteSchemeHandler.handlers[name] = function
cls.handlers[name] = function
return namedecorator
def createRequest(self, _op, request, _outgoing_data):