diff options
author | Jack Lloyd <[email protected]> | 2017-12-03 13:20:30 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-04 06:14:33 -0500 |
commit | 20563db49fb823ef331822e6795849d01ce0df3b (patch) | |
tree | cc63466a1e21b104b58ec3572a946fa8a3856cff /src/scripts/cleanup.py | |
parent | b236a8aa0803bac4fba3c1de840379fb01f54ca1 (diff) |
Add a script for generating the documentation
Diffstat (limited to 'src/scripts/cleanup.py')
-rwxr-xr-x | src/scripts/cleanup.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/scripts/cleanup.py b/src/scripts/cleanup.py index d246f766c..71c59609e 100755 --- a/src/scripts/cleanup.py +++ b/src/scripts/cleanup.py @@ -69,8 +69,9 @@ def main(args=None): build_dir = options.build_dir if os.access(build_dir, os.X_OK) != True: - logging.error("Unable to access build directory") - return 1 + logging.debug('No build directory found') + # No build dir: clean enough! + return 0 build_config_path = os.path.join(build_dir, 'build_config.json') build_config_str = None @@ -86,8 +87,6 @@ def main(args=None): build_config = json.loads(build_config_str) - #print(json.dumps(build_config, sort_keys=True, indent=3)) - if options.distclean: build_dir = build_config['build_dir'] remove_file(build_config['makefile_path']) @@ -97,7 +96,12 @@ def main(args=None): dir_path = build_config[dir_type] remove_all_in_dir(dir_path) - shutil.rmtree(build_config['doc_output_dir']) + try: + shutil.rmtree(build_config['doc_output_dir']) + except OSError as e: + pass + + #remove_file(build_config['doc_stamp_file']) remove_file(build_config['cli_exe']) remove_file(build_config['test_exe']) |