88import xml .etree .ElementTree as ET
99from io import SEEK_CUR , SEEK_END , SEEK_SET , BufferedReader , BytesIO
1010from pathlib import Path
11- from typing import Dict , Optional , Union
11+ from typing import Dict , Optional , Union , List
1212from urllib .parse import urlencode
1313
1414import requests
@@ -1661,7 +1661,7 @@ def admin_resetpolicyforuser(self, username: str) -> None:
16611661
16621662 self ._raise_exception_from_command (resp )
16631663
1664- def get_config_settings (self , config : list [str ]) -> None :
1664+ def admin_get_config_settings (self , config : List [str ]) -> ServerSettings :
16651665 """
16661666 Retrieve Filecloud configuration settings. The config list should
16671667 contain FC configuration keys.
@@ -1673,18 +1673,14 @@ def get_config_settings(self, config: list[str]) -> None:
16731673 except (ValueError , TypeError ):
16741674 count = 0
16751675
1676- config_opts = []
1676+ config_opts = {}
16771677 for i in range (count ):
16781678 param_key = f"param{ i } "
1679- config_opts [param_key ] = config [i ]
1679+ config_opts [param_key ] = config [i ] # type:ignore
16801680
1681- resp = self ._api_call (
1682- "/admin/getconfigsetting" ,
1683- {
1684- "count" : str (len (config_opts )),
1685- ** {f"param{ i } " : value for i , value in enumerate (config_opts )},
1686- },
1687- )
1681+ config_opts ["count" ] = str (len (config_opts ))
1682+
1683+ resp = self ._api_call ("/admin/getconfigsetting" , config_opts )
16881684
16891685 settings = ServerSettings (resp )
16901686 return settings
0 commit comments