diff options
author | Florian Bruhin <git@the-compiler.org> | 2015-12-02 18:14:34 +0100 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2015-12-02 18:14:34 +0100 |
commit | f342f129c670969530c3721885ca3eade444209f (patch) | |
tree | 30078f4fc056405c6c6ee68f84fd92fc14bcb952 /scripts/utils.py | |
parent | 7df01440a31dbfdbccb872d31020352e123dc0d2 (diff) | |
download | qutebrowser-f342f129c670969530c3721885ca3eade444209f.tar.gz qutebrowser-f342f129c670969530c3721885ca3eade444209f.zip |
Refactor how use_color is set in scripts/utils.
Diffstat (limited to 'scripts/utils.py')
-rw-r--r-- | scripts/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/utils.py b/scripts/utils.py index c6fdacd24..6e5664c62 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -22,20 +22,20 @@ import os import os.path -use_color = True - # Import side-effects are an evil thing, but here it's okay so scripts using # colors work on Windows as well. try: import colorama except ImportError: - if os.name == 'nt': - use_color = False + colorama = None else: colorama.init() +use_color = os.name != 'nt' or colorama + + fg_colors = { 'black': 30, 'red': 31, |