Skip to content

Commit 1ed8cb2

Browse files
committed
Write value of argument "--config" to attribute "config_file"
Without this change the value of the argument "--config" given on the command line is ignored completely, but a new default config file gets gcreated. With this change the config file specified on the command line is used correctly. As far as I can see in the code the same seems to apply to the command line argument "--hooks" and the attribute "hooks_file".
1 parent 276c86c commit 1ed8cb2

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

webchanges/config.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,20 @@ def parse_args(self, cmdline_args: List[str]) -> argparse.ArgumentParser:
120120
dest='jobs_def_file',
121121
)
122122
group.add_argument(
123-
'--config', default=self.config_file, type=Path, help='read configuration from FILE', metavar='FILE'
123+
'--config',
124+
default=self.config_file,
125+
type=Path,
126+
help='read configuration from FILE',
127+
metavar='FILE',
128+
dest='config_file',
124129
)
125130
group.add_argument(
126-
'--hooks', default=self.hooks_file, type=Path, help='use FILE as imported hooks.py module', metavar='FILE'
131+
'--hooks',
132+
default=self.hooks_file,
133+
type=Path,
134+
help='use FILE as imported hooks.py module',
135+
metavar='FILE',
136+
dest='hooks_file',
127137
)
128138
group.add_argument(
129139
'--cache',

0 commit comments

Comments
 (0)