From f1410b7c1fce8afb579e3b9762e298c0f96ec541 Mon Sep 17 00:00:00 2001 From: WORD559 Date: Thu, 3 Oct 2019 16:36:26 +0100 Subject: [PATCH] Use util.asbool rather than manual true-value parsing --- bumblebee/output.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bumblebee/output.py b/bumblebee/output.py index f70b605..004dfe8 100644 --- a/bumblebee/output.py +++ b/bumblebee/output.py @@ -7,15 +7,14 @@ import json import uuid import bumblebee.store - -_TrueValues = ["true", "t", "yes", "y", "1"] +import bumblebee.util def scrollable(func): def wrapper(module, widget): text = func(module, widget) if not text: return text width = widget.get("theme.width", module.parameter("width", 30)) - if module.parameter("scrolling.makewide", "true").lower() in _TrueValues: + if bumblebee.util.asbool(module.parameter("scrolling.makewide", "true")): widget.set("theme.minwidth", "A"*width) if len(text) <= width: return text