Skip to content

Commit

Permalink
SyntaxError: f-string: unmatched '[' in server list (on the DEVELOP b…
Browse files Browse the repository at this point in the history
…ranch only) #3018
  • Loading branch information
nicolargo committed Nov 15, 2024
1 parent 318a61d commit 9fe0c81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions glances/servers_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def __update_stats(self, server):
if server['protocol'].lower() == 'rpc':
self.__update_stats_rpc(server['uri'], server)
elif server['protocol'].lower() == 'rest' and not import_requests_error_tag:
self.__update_stats_rest(f'{server['uri']}/api/{__apiversion__}', server)
self.__update_stats_rest(f"{server['uri']}/api/{__apiversion__}", server)

return server

Expand Down Expand Up @@ -208,9 +208,9 @@ def __update_stats_rest(self, uri, server):
for column in self.get_columns():
server_key = self.__get_key(column)
# Build the URI (URL encoded)
request_uri = f'{column['plugin']}/{column['field']}'
request_uri = f"{column['plugin']}/{column['field']}"
if 'key' in column:
request_uri += f'/{column['key']}'
request_uri += f"/{column['key']}"
request_uri = f'{uri}/' + requests.utils.quote(request_uri)
# Value
try:
Expand Down

0 comments on commit 9fe0c81

Please sign in to comment.