For all of these I'm intentionally not raising exceptions because of the two ways this gets called, and also because it was originally a shell script.  As a result it made more sense to log and return a non-zero status.  If I just raise exceptions each time, that means in sysadmin.py I have to catch all the various versions of exceptions in sysadmin.py instead of just printing the log messages to the user on the Web page, and generally letting them know it failed.  This seemed simpler and more versatile for the two access paths to the script.