Handle missing / deleted / renamed files correctly. 33/40233/1
authorlhinds <lhinds@redhat.com>
Fri, 25 Aug 2017 10:05:00 +0000 (11:05 +0100)
committerlhinds <lhinds@redhat.com>
Fri, 25 Aug 2017 10:05:00 +0000 (11:05 +0100)
commit5eb82911e0fb7dd2d5baa20d50c13fb7708b7fd4
treec8c7dfcf695d58a71ecd8cfa8b7d3119498cbd5c
parent6248ecb0d79c3bb0ab31cd2a40222b246a8c206f
Handle missing / deleted / renamed files correctly.

Previously git rm or mv'ed files would be listed in the patchset.

Anteater would then attempt to open the files and fail (as they don't
exist).

This patch resolves the issue by first not sys.exit'ing on a file not
existing, and also not logging with ERROR level (which made the
security audit job incorrectly fail).

JIRA: RELENG-302

Change-Id: I6a0c56f691f4d80aca1b3509472c1d6e56d492e1
Signed-off-by: lhinds <lhinds@redhat.com>
anteater/src/patch_scan.py