Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* shutil.rmtree removes directories recursively and has ignore errors, so no need for the wrapper function/classes * lib/init/grass: Simplify encode()/decode() functions. * lib/init/grass: Move all the imports at the beginning of the file. * lib/init/grass: Simplify clean_env(). "clean_env()" is only being called once. Even if it gets called multiple times in the future, it is unlikely that it will be used with a different "gisrc". * Just keeping globals and the initialization stuff at the beginning of the module * lib/init/grass: Group the logging functions together. * lib/init/grass: Move the info message out of the "show_info()" function. This was messing up with the vim code folding. * lib/init/grass: Remove unused constants * lib/init/grass: Remove old comment about removed nested session test The comment is from 2015. If there were problems, they would have surfaced since then. * lib/init/grass: Move all the gisbase stuff in a single place. * lib/init/grass: Capitalize all constants * lib/init/grass: Simplify setting a value to CONFIG_PROJSHARE * lib/init/grass: Add comments about GISBASE * lib/init/grass: Validate cmdline in a separate function * lib/init/grass: Inline variable substitution inside "help_message()" The main motivation here is to avoid making "_()" calls at the module level which will hopefully let us remove the early "gettext.install()" call in a later commit. * lib/init/grass: Refuse to start if ~/.grass7 exists but is not a directory * lib/init/grass: Ensure that the init process only happens inside main() 1. we remove the "gettext.install()" call from the module level 2. we make sure that "set_language()" is the first step of the init process. * lib/init/grass: Use six for cross version Python compatibility Six is being pulled by matplotlib anyway, but for good measure, I also added it to the explicit requirements.
- Loading branch information