mirror of https://github.com/openXC7/prjxray.git
Move setting output path to `run` function
`get_setting` function is setup in `run` function and can't be used before it Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
This commit is contained in:
parent
0339695c0d
commit
0b28b67bd3
|
|
@ -966,6 +966,10 @@ def run(settings, output, verbose=False, allow_fake=False):
|
|||
|
||||
get_setting = mk_get_setting(settings)
|
||||
|
||||
if output is None:
|
||||
output = os.path.join(
|
||||
os.path.curdir, 'html', get_setting('XRAY_DATABASE'))
|
||||
|
||||
db_dir = os.path.join(
|
||||
get_setting("XRAY_DATABASE_DIR"), get_setting("XRAY_DATABASE"))
|
||||
|
||||
|
|
@ -999,8 +1003,7 @@ def main():
|
|||
parser.add_argument('--verbose', action='store_true')
|
||||
parser.add_argument(
|
||||
'--output',
|
||||
default=os.path.join(
|
||||
os.path.curdir, 'html', get_setting('XRAY_DATABASE')),
|
||||
default=None,
|
||||
help='Put the generated files in this directory (default current dir).'
|
||||
)
|
||||
parser.add_argument(
|
||||
|
|
|
|||
Loading…
Reference in New Issue