[core] (..., dict) means Bag(..., **dict)

This commit is contained in:
Romain Dorgueil
2017-10-22 16:21:44 +02:00
parent 650b49a41a
commit 42c1fee6f1
2 changed files with 4 additions and 1 deletions

View File

@ -159,6 +159,8 @@ def _resolve(input_bag, output):
return Bag(**output) return Bag(**output)
if istuple(output): if istuple(output):
if len(output) > 1 and isdict(output[-1]):
return Bag(*output[0:-1], **output[-1])
return Bag(*output) return Bag(*output)
# Either we use arg0 format, either it's "just" a value. # Either we use arg0 format, either it's "just" a value.

View File

@ -1,6 +1,7 @@
from logging import getLogger
from colorama import Fore, Back, Style from colorama import Fore, Back, Style
from django.core.management.base import BaseCommand, OutputWrapper from django.core.management.base import BaseCommand, OutputWrapper
from logging import getLogger
import bonobo import bonobo
import bonobo.util import bonobo.util