We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 849e6c6 commit 35d00b2Copy full SHA for 35d00b2
src/geophires_x/GEOPHIRESv3.py
@@ -5,6 +5,8 @@
5
import logging.config
6
import os
7
import sys
8
+from pathlib import Path
9
+
10
import geophires_x.Model as Model
11
import geophires_x.OptionList as OptionList
12
@@ -61,9 +63,9 @@ def main(enable_geophires_logging_config=True):
61
63
62
64
json_outputfile = 'HDR.json'
65
if len(sys.argv) > 2:
- json_outputfile = str(sys.argv[2])
- segs = json_outputfile.split('.')
66
- json_outputfile = segs[0] + '.json'
+ output_arg = str(sys.argv[2])
67
+ output_arg_path = Path(output_arg)
68
+ json_outputfile = output_arg.replace(output_arg_path.name, f'{output_arg_path.stem}.json')
69
with open(json_outputfile, 'w', encoding='UTF-8') as f:
70
f.write(json.dumps(json_merged))
71
0 commit comments