Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5163C200C8A for ; Sun, 4 Jun 2017 18:24:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 50231160BE0; Sun, 4 Jun 2017 16:24:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BDD0F160BB7 for ; Sun, 4 Jun 2017 18:24:39 +0200 (CEST) Received: (qmail 44550 invoked by uid 500); 4 Jun 2017 16:24:39 -0000 Mailing-List: contact commits-help@ariatosca.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ariatosca.incubator.apache.org Delivered-To: mailing list commits@ariatosca.incubator.apache.org Received: (qmail 44541 invoked by uid 99); 4 Jun 2017 16:24:38 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jun 2017 16:24:38 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D34C4DFB01; Sun, 4 Jun 2017 16:24:38 +0000 (UTC) From: mxmrlv To: commits@ariatosca.apache.org Reply-To: commits@ariatosca.apache.org References: In-Reply-To: Subject: [GitHub] incubator-ariatosca pull request #141: ARIA-262 inconsistent node attributes... Content-Type: text/plain Message-Id: <20170604162438.D34C4DFB01@git1-us-west.apache.org> Date: Sun, 4 Jun 2017 16:24:38 +0000 (UTC) archived-at: Sun, 04 Jun 2017 16:24:40 -0000 Github user mxmrlv commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/141#discussion_r120014181 --- Diff: aria/orchestrator/decorators.py --- @@ -68,11 +68,13 @@ def operation(func=None, toolbelt=False, suffix_template='', logging_handlers=No @wraps(func) def _wrapper(**func_kwargs): + ctx = func_kwargs.pop('ctx') if toolbelt: - operation_toolbelt = context.toolbelt(func_kwargs['ctx']) + operation_toolbelt = context.toolbelt(ctx) func_kwargs.setdefault('toolbelt', operation_toolbelt) - validate_function_arguments(func, func_kwargs) - return func(**func_kwargs) + validate_function_arguments(func, ctx=ctx, **func_kwargs) --- End diff -- instead of pop, use get, dont use **, later pop ctx. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---