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 863D0200CD8 for ; Wed, 2 Aug 2017 20:11:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 851DA16A0A6; Wed, 2 Aug 2017 18:11:24 +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 BCE8816A09E for ; Wed, 2 Aug 2017 20:11:23 +0200 (CEST) Received: (qmail 99828 invoked by uid 500); 2 Aug 2017 18:11:23 -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 99758 invoked by uid 99); 2 Aug 2017 18:11:22 -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; Wed, 02 Aug 2017 18:11:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4E4CDF5538; Wed, 2 Aug 2017 18:11:22 +0000 (UTC) From: AviaE To: commits@ariatosca.apache.org Reply-To: commits@ariatosca.apache.org References: In-Reply-To: Subject: [GitHub] incubator-ariatosca pull request #189: ARIA-174 Refactor instantiation phase Content-Type: text/plain Message-Id: <20170802181122.4E4CDF5538@git1-us-west.apache.org> Date: Wed, 2 Aug 2017 18:11:22 +0000 (UTC) archived-at: Wed, 02 Aug 2017 18:11:24 -0000 Github user AviaE commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/189#discussion_r130870769 --- Diff: aria/utils/console.py --- @@ -19,19 +19,68 @@ import os import sys +from StringIO import StringIO from contextlib import contextmanager -from .formatting import safe_str from ..cli import color +from . import formatting _indent_string = '' +class TopologyStylizer(object): + def __init__(self, indentation=2): + self._str = StringIO() + self._indentation = indentation + + def write(self, str_): + puts(str_, stream=self._str) + + @contextmanager + def indent(self, indentation=None): --- End diff -- This should only affect the calls for `write` and not the module level `puts` --- 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. ---