[ARVADOS] updated: 30fb9bf812c51d2876ee82eda86dd07972f77e1e
Git user
git at public.curoverse.com
Wed Sep 28 09:52:13 EDT 2016
Summary of changes:
services/dockercleaner/arvados_docker/cleaner.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
via 30fb9bf812c51d2876ee82eda86dd07972f77e1e (commit)
from 4d5de0e464c1de110de46588f3193c4677ac719c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 30fb9bf812c51d2876ee82eda86dd07972f77e1e
Author: Tom Clegg <tom at curoverse.com>
Date: Wed Sep 28 09:44:07 2016 -0400
9953: If config cannot be read/parsed, show just the error without the stack trace.
diff --git a/services/dockercleaner/arvados_docker/cleaner.py b/services/dockercleaner/arvados_docker/cleaner.py
index 9dd7b12..8b8c772 100755
--- a/services/dockercleaner/arvados_docker/cleaner.py
+++ b/services/dockercleaner/arvados_docker/cleaner.py
@@ -257,8 +257,12 @@ def load_config(arguments):
args = parse_arguments(arguments)
config = default_config()
- with open(args.config, 'r') as f:
- config.update(json.load(f))
+ try:
+ with open(args.config, 'r') as f:
+ c = json.load(f)
+ config.update(c)
+ except (FileNotFoundError, IOError, ValueError) as error:
+ sys.exit('error reading config file {}: {}'.format(args.config, error))
configargs = vars(args).copy()
configargs.pop('config')
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list