Skip to content


Browse files Browse the repository at this point in the history
Convert QgsTask.fromFunction to a static method
  • Loading branch information
nyalldawson committed Dec 5, 2016
1 parent 619381c commit 29f310c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/core/
Expand Up @@ -234,8 +234,9 @@ def finished(self, result):
self.exception = ex

def fromFunction(cls, description, function, *args, on_finished=None, flags=QgsTask.AllFlags, **kwargs):
def fromFunction(description, function, *args, on_finished=None, flags=QgsTask.AllFlags, **kwargs):
assert function
return QgsTaskWrapper(description, flags, function, on_finished, *args, **kwargs)

QgsTask.fromFunction = classmethod(fromFunction)
QgsTask.fromFunction = fromFunction

0 comments on commit 29f310c

Please sign in to comment.