kiblee / tod0

A Terminal Client for Microsoft To-Do
MIT License
124 stars 19 forks source link

Print usage when no argument is provided #25

Closed devzeb closed 3 years ago

devzeb commented 3 years ago

Reworked what happens when no argument is provided.

Before a try...except block caught a TypeError when trying to call namespace.func (because namespace.func was None). However, this will also catch type errors that can happen otherwise in the code.

Now: Explicitly check if namespace.func is None. If it is, print the usage message instead of the help message.