diff options
author | 2018-07-17 09:15:14 -0400 | |
---|---|---|
committer | 2018-07-17 09:15:14 -0400 | |
commit | d63caae3c70d6c6a4c908dde07e0d16b451ab4e0 (patch) | |
tree | 20bd5c8cda758dcac5357392aa455f216a4138fb /package.mask | |
parent | mask_check.py: Have print statements work in Python 3 (diff) | |
download | qa-scripts-d63caae3c70d6c6a4c908dde07e0d16b451ab4e0.tar.gz qa-scripts-d63caae3c70d6c6a4c908dde07e0d16b451ab4e0.tar.bz2 qa-scripts-d63caae3c70d6c6a4c908dde07e0d16b451ab4e0.zip |
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.
Diffstat (limited to 'package.mask')
-rwxr-xr-x | package.mask/mask_check.py | 5 |
1 files changed, 4 insertions, 1 deletions
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" |