Skip to content

Commit

Permalink
Use click.echo() vs print() (#88)
Browse files Browse the repository at this point in the history
retr0h authored Mar 14, 2020
1 parent 1ea75e9 commit 2a02903
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gilt/util.py
Original file line number Diff line number Diff line change
@@ -26,19 +26,20 @@
import sh
import shutil

import click
import colorama

colorama.init(autoreset=True)


def print_info(msg):
"""Print the given message to STDOUT. """
print(msg)
click.echo(msg)


def print_warn(msg):
"""Print the given message to STDOUT in YELLOW. """
print("{}{}".format(colorama.Fore.YELLOW, msg))
click.echo("{}{}".format(colorama.Fore.YELLOW, msg))


def run_command(cmd, debug=False):

0 comments on commit 2a02903

Please sign in to comment.