Catch OSError when trying to get the last_update from git
The "git" executable might not be available (eg. in build environments where the .git dir is anyway no there because tarballs are used). In that case, the current code failed with an OSError: [Errno 2] No such file or directory exception. This is now catched and the code works even if "git" is not available. Change-Id: I10f69d1b2cadced4cd155ef9b7f700a2806f44f9
This commit is contained in:
parent
46fd27003e
commit
1430d84470
|
@ -32,7 +32,7 @@ def _get_last_updated_file(src_file):
|
|||
'--', src_file,
|
||||
]
|
||||
).decode('utf-8').strip()
|
||||
except subprocess.CalledProcessError as err:
|
||||
except (subprocess.CalledProcessError, OSError) as err:
|
||||
LOG.info(
|
||||
'[openstackdocstheme] Could not get modification time of %s: %s',
|
||||
src_file, err)
|
||||
|
|
Loading…
Reference in New Issue