Commit 486aa7be authored by Bram Schoenmakers's avatar Bram Schoenmakers

Show error when launching column mode in Windows

Related to issue #194.
parent 05a1a68d
......@@ -22,8 +22,10 @@ import sys
from topydo.ui.cli.CLI import CLIApplication
from topydo.ui.CLIApplicationBase import MAIN_OPTS, MAIN_LONG_OPTS, error
_WINDOWS = "win32" in sys.platform
# enable color on windows CMD
if "win32" in sys.platform:
if _WINDOWS:
import colorama
colorama.init()
......@@ -51,6 +53,11 @@ def main():
UIApplication().run()
except ImportError:
error("Some additional dependencies for column mode were not installed, please install with 'pip3 install topydo[columns]'")
except NameError as err:
if _WINDOWS:
error("Column mode is not supported on Windows.")
else:
error("Could not load column mode: {}".format(err))
else:
CLIApplication().run()
except IndexError:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment