commit: d63caae3c70d6c6a4c908dde07e0d16b451ab4e0
Author: Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 17 13:15:14 2018 +0000
Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Jul 17 13:15:14 2018 +0000
URL: https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=d63caae3
mask_check.py: Catch open exceptions for timestamp
Git checkouts won't have this file and the timestamp is only used
in output logging. It would be wonderful to extend further,
but if the file is empty anyway it doesn't seem to care.
package.mask/mask_check.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/package.mask/mask_check.py b/package.mask/mask_check.py
index 77b493a..30508f1 100755
--- a/package.mask/mask_check.py
+++ b/package.mask/mask_check.py
@@ -265,7 +265,10 @@ def check_pkg(portdir, line):
def get_timestamp():
timestamp_f = join(settings["PORTDIR"], "metadata/timestamp.chk")
- timestamp = open(timestamp_f).readline().rstrip()
+ try:
+ timestamp = open(timestamp_f).readline().rstrip()
+ except:
+ return "Unknown"
if len(timestamp) < 1:
return "Unknown"