commands.py: handle missing command

The current code aborts with a traceback if the command meant to be
documented is missing. This patch makes the program handle that case
more gracefully.

Change-Id: Id767bcf5731339d219b6b05af27fbe7722881591