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 ...@@ -22,8 +22,10 @@ import sys
from topydo.ui.cli.CLI import CLIApplication from topydo.ui.cli.CLI import CLIApplication
from topydo.ui.CLIApplicationBase import MAIN_OPTS, MAIN_LONG_OPTS, error from topydo.ui.CLIApplicationBase import MAIN_OPTS, MAIN_LONG_OPTS, error
_WINDOWS = "win32" in sys.platform
# enable color on windows CMD # enable color on windows CMD
if "win32" in sys.platform: if _WINDOWS:
import colorama import colorama
colorama.init() colorama.init()
...@@ -51,6 +53,11 @@ def main(): ...@@ -51,6 +53,11 @@ def main():
UIApplication().run() UIApplication().run()
except ImportError: except ImportError:
error("Some additional dependencies for column mode were not installed, please install with 'pip3 install topydo[columns]'") 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: else:
CLIApplication().run() CLIApplication().run()
except IndexError: 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