def check_or_die(command):
 if (command is None):
  raise CommandNotFoundError("'None' is not a valid command.")
 if (not which(command)):
  raise CommandNotFoundError("'{0}' is not in the path".format(command))

def check_or_die ( command ) : if ( command is None ) : raise CommandNotFoundError ( "'None' is not a valid command." ) if ( not which ( command ) ) : raise CommandNotFoundError ( "'{0}' is not in the path" . format ( command ) )
simple convenience function for modules to use for gracefully blowing up if a required tool is not available in the system path .