ariatosca-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AviaE <>
Subject [GitHub] incubator-ariatosca pull request #188: ARIA-324 Refactor ctx proxy access
Date Sun, 30 Jul 2017 14:40:52 GMT
Github user AviaE commented on a diff in the pull request:
    --- Diff: aria/orchestrator/execution_plugin/ctx_proxy/ ---
    @@ -150,43 +150,101 @@ def __exit__(self, *args, **kwargs):
    -def _process_ctx_request(ctx, args):
    +def _process_ctx_request(ctx, args): # pylint: disable=too-many-branches,too-many-statements
         current = ctx
    -    num_args = len(args)
         index = 0
    +    try:
    +        # TODO: should there be a way to escape "=" in case it is needed as real argument?
    +        equals_index = args.index('=')
    --- End diff --
    Maybe add a comment here that says that `.index` raises a `ValueError` if the value is
not in the list. And that is why you check for `ValueError` in the end. It wasn't clear for
@mxmrlv also.
    In addition, why does all the other logic under this line is in the `try` if it doesn't
expected to raise `ValueError`. I understand that extracting this part will force you to refactor
the order of the statements a bit - just a thought =)

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 or file a JIRA ticket
with INFRA.

View raw message