Skip to content

Commit

Permalink
7831 FIX fileinfo: Warn if timestamp of file stat is missing
Browse files Browse the repository at this point in the history
Change-Id: I52f6209703ac6920baa10d56150667be1764c8ab
  • Loading branch information
si-23 committed Jun 17, 2019
1 parent 6c0a482 commit 6367f8b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .werks/7831
@@ -0,0 +1,10 @@
Title: fileinfo: Warn if timestamp of file stat is missing
Level: 1
Component: checks
Compatible: compat
Edition: cre
Version: 1.7.0i1
Date: 1560499335
Class: fix


2 changes: 2 additions & 0 deletions checks/fileinfo
Expand Up @@ -245,6 +245,8 @@ def check_fileinfo(item, params, parsed):
if file_stat is not None and not file_stat.missing:
if file_stat.failed:
return 1, "File stat failed"
if file_stat.time is None:
return 1, 'File stat time failed'
age = reftime - file_stat.time
check_definition = [
("Size", "size", file_stat.size, get_filesize_human_readable),
Expand Down

0 comments on commit 6367f8b

Please sign in to comment.