The exit() is redundant (you would use that if you wanted to exit somewhere in the middle of the script). Other than that, looks fine, as far as it goes. You may wish to add some error handling in case the locations don't exist, just so that your users don't have to read through the traceback if that happens.