If you try to run this script from a POSIX root that has spaces in filenames (such as "/Users/michael/Dropbox/My Mac (MacBook-Pro.local)/") the run_command function will fail (as will several subsequent things).
A workaround is to clone the root into an environment without such characters in the root.
A path for a fix is to change the interface to use the subprocess module (see PEP 324).
shlex makes a mess of things because the quotes it uses to protect bash are quotes that are mis-interpreted by os.* commands.
If you try to run this script from a POSIX root that has spaces in filenames (such as "/Users/michael/Dropbox/My Mac (MacBook-Pro.local)/") the
run_command
function will fail (as will several subsequent things).A workaround is to clone the root into an environment without such characters in the root.
A path for a fix is to change the interface to use the
subprocess
module (see PEP 324).shlex
makes a mess of things because the quotes it uses to protect bash are quotes that are mis-interpreted byos.*
commands.