20937: Add error handling to threaded collection copy
[arvados.git] / sdk / python / arvados / config.py
index 0c4ccb060d07d93202c73a05676c2f9d8c2102b4..6f3bd027901181a5e68e79218d383dec4d13c32a 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
 # config.py - configuration settings and global variables for Arvados clients
 #
 # Arvados configuration settings are taken from $HOME/.config/arvados.
@@ -15,9 +19,6 @@ else:
 KEEP_BLOCK_SIZE = 2**26
 EMPTY_BLOCK_LOCATOR = 'd41d8cd98f00b204e9800998ecf8427e+0'
 
-# This is the 64 MiB block consisting entirely of zeros
-PADDING_BLOCK_LOCATOR = '7f614da9329cd3aebf59b91aadc30bf0+67108864'
-
 def initialize(config_file=default_config_file):
     global _settings
     _settings = {}
@@ -37,9 +38,7 @@ def load(config_file):
     cfg = {}
     with open(config_file, "r") as f:
         for config_line in f:
-            if re.match('^\s*$', config_line):
-                continue
-            if re.match('^\s*#', config_line):
+            if re.match(r'^\s*(?:#|$)', config_line):
                 continue
             var, val = config_line.rstrip().split('=', 2)
             cfg[var] = val