> Be careful, by the way, this could still raise a ValueError if for whatever reason the task command returns an empty string as output.

Yes, correct.

> Situations in which that might happen include when, perhaps, searching for a task that doesn't exist. That being said, a ValueError is probably still the right exception to raise in that case (but the traceback might be a little confusing).

Yeah, I prefer to let the exceptions bubble up and be handled or not by whatever application is using ``taskw``.  Catching and returning ``None`` just seems to mask whatever problem is lurking underneath.