summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-07-16 11:39:13 +0100
committerErik Johnston <erik@matrix.org>2019-07-16 11:39:40 +0100
commitf44354e17f11c2a5949861052db1f49d8b67233b (patch)
treeb347a02df371def32ccd0132ae331e66987f3372 /synapse
parentFix typo in synapse/app/admin_cmd.py (diff)
downloadsynapse-f44354e17f11c2a5949861052db1f49d8b67233b.tar.xz
Clean up arg name and remove lying comment
Diffstat (limited to 'synapse')
-rw-r--r--synapse/config/_base.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/synapse/config/_base.py b/synapse/config/_base.py
index ba1025f86e..6ce5cd07fb 100644
--- a/synapse/config/_base.py
+++ b/synapse/config/_base.py
@@ -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