Skip to content

Commit 6d728d8

Browse files
authored
Merge pull request #34 from ClimateImpactLab/command_line_patch
fix command line tool to correctly accept non-default config
2 parents 04c2d51 + ecf916e commit 6d728d8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scripts/command_line_scghg.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from pathlib import Path
33
from pyfiglet import Figlet
44
import os
5+
import sys
6+
57
from scghg_utils import read_replace_conf, epa_scghgs, VERSION
68

79
if __name__ == "__main__":
@@ -10,8 +12,13 @@
1012
print(f.renderText("DSCIM"))
1113
print(f"... dscim-facts-epa version {VERSION} ...")
1214

15+
args = sys.argv
16+
if len(args) == 1:
17+
conf_name = "generated_conf.yml"
18+
else:
19+
conf_name = args[1]
20+
1321
# Path to the config for this run
14-
conf_name = "generated_conf.yml"
1522
master = Path(os.getcwd()) / conf_name
1623
conf = read_replace_conf(master)
1724

0 commit comments

Comments
 (0)