Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
f44354e1
Commit
f44354e1
authored
5 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Clean up arg name and remove lying comment
parent
d0d479c1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/config/_base.py
+5
-7
5 additions, 7 deletions
synapse/config/_base.py
with
5 additions
and
7 deletions
synapse/config/_base.py
+
5
−
7
View file @
f44354e1
...
...
@@ -266,12 +266,10 @@ class Config(object):
"
Defaults to the directory containing the last config file
"
,
)
# We can only invoke `add_arguments` on an actual object, but
# `add_arguments` should be side effect free so this is probably fine.
cls
.
invoke_all_static
(
"
add_arguments
"
,
config_parser
)
@classmethod
def
load_config_with_parser
(
cls
,
config_
parser
,
argv
):
def
load_config_with_parser
(
cls
,
parser
,
argv
):
"""
Parse the commandline and config files with the given parser
Doesn
'
t support config-file-generation: used by the worker apps.
...
...
@@ -279,23 +277,23 @@ class Config(object):
Used for workers where we want to add extra flags/subcommands.
Args:
config_
parser (ArgumentParser)
parser (ArgumentParser)
argv (list[str])
Returns:
tuple[HomeServerConfig, argparse.Namespace]: Returns the parsed
config object and the parsed argparse.Namespace object from
`
config_
parser.parse_args(..)`
`parser.parse_args(..)`
"""
obj
=
cls
()
config_args
=
config_
parser
.
parse_args
(
argv
)
config_args
=
parser
.
parse_args
(
argv
)
config_files
=
find_config_files
(
search_paths
=
config_args
.
config_path
)
if
not
config_files
:
config_
parser
.
error
(
"
Must supply a config file.
"
)
parser
.
error
(
"
Must supply a config file.
"
)
if
config_args
.
keys_directory
:
config_dir_path
=
config_args
.
keys_directory
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment