mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
project: Ignore failure to remove the sample hooks
Removing the sample hooks is just clean up, so if repo cannot remove a sample hook that should not cause it to fail. Change-Id: I716b977da091c22b8f53e134f4fbc114116f9a65 Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/328635 Reviewed-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
parent
a535ae4418
commit
b550501254
@ -2554,7 +2554,10 @@ class Project(object):
|
|||||||
|
|
||||||
# Delete sample hooks. They're noise.
|
# Delete sample hooks. They're noise.
|
||||||
for hook in glob.glob(os.path.join(hooks, '*.sample')):
|
for hook in glob.glob(os.path.join(hooks, '*.sample')):
|
||||||
|
try:
|
||||||
platform_utils.remove(hook, missing_ok=True)
|
platform_utils.remove(hook, missing_ok=True)
|
||||||
|
except PermissionError:
|
||||||
|
pass
|
||||||
|
|
||||||
for stock_hook in _ProjectHooks():
|
for stock_hook in _ProjectHooks():
|
||||||
name = os.path.basename(stock_hook)
|
name = os.path.basename(stock_hook)
|
||||||
|
Loading…
Reference in New Issue
Block a user