Skip to content

Commit

Permalink
Change config['GLOBAL'] to config.get('GLOBAL', {})
Browse files Browse the repository at this point in the history
  • Loading branch information
OmegaLambda1998 committed Apr 1, 2024
1 parent 55862c6 commit 6ca9550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pippin/snana_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def __init__(self, name, output_dir, config, global_config, combine="combine.inp
self.output["types_dict"] = types_dict
self.output["types"] = sorted_types

rankeys = [r for r in self.config["GLOBAL"].keys() if r.startswith("RANSEED_")]
rankeys = [r for r in self.config.get("GLOBAL", {}).keys() if r.startswith("RANSEED_")]
value = int(self.config["GLOBAL"][rankeys[0]].split(" ")[0]) if rankeys else 1
self.set_num_jobs(2 * value)

Expand Down

0 comments on commit 6ca9550

Please sign in to comment.