Skip to content
Permalink
Browse files
Don't explode returned values in QgsTaskWrapper
Breaks returning list values
  • Loading branch information
nyalldawson committed Dec 5, 2016
1 parent f73f3c1 commit fded1a1f394a671c637a1f8e42e9d743f7dd3fea
Showing with 4 additions and 8 deletions.
  1. +1 −5 python/core/__init__.py
  2. +3 −3 tests/src/python/test_qgstaskmanager.py
@@ -224,11 +224,7 @@ def finished(self, result):

try:
if self.returned_values:
# we want to support singular returned values which are not iterable
if hasattr(self.returned_values, '__iter__'):
self.on_finished(result, *self.returned_values)
else:
self.on_finished(result, self.returned_values)
self.on_finished(result, self.returned_values)
else:
self.on_finished(result)
except Exception as ex:
@@ -80,9 +80,9 @@ def run_multiple_val_result(task):
return 5, 'whoo'


def finished_multiple_value_result(result, value, statement):
finished_multiple_value_result.value = value
finished_multiple_value_result.statement = statement
def finished_multiple_value_result(result, results):
finished_multiple_value_result.value = results[0]
finished_multiple_value_result.statement = results[1]
return


0 comments on commit fded1a1

Please sign in to comment.