From f22115792a13325a0c0052f6b12fddef1b47caf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20GR=C3=89A?= Date: Wed, 30 Oct 2019 16:16:14 +0100 Subject: [PATCH] Add check if middle_text is too short (#811) * Add check if middle_text is too short * Use int division as suggested --- esphome/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/__main__.py b/esphome/__main__.py index bf2d68d834..a78413ff04 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -364,7 +364,7 @@ def command_update_all(args): def print_bar(middle_text): middle_text = " {} ".format(middle_text) width = len(click.unstyle(middle_text)) - half_line = "=" * ((twidth - width) / 2) + half_line = "=" * ((twidth - width) // 2) click.echo("%s%s%s" % (half_line, middle_text, half_line)) for f in files: