Merge branch 'main' into 21440-process-panel-reorg
[arvados.git] / sdk / python / arvados / config.py
index e17eb1ff57dd13b29faacb412eb15d06bbb5503d..6f3bd027901181a5e68e79218d383dec4d13c32a 100644 (file)
@@ -38,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