Various string cleanups (#30435)
* Remove some unnecessary string concatenations * Replace some simple str.formats with f-strings * Replace some string concatenations with f-strings
This commit is contained in:
1 parent
5ad209c6fd
commit
fa4fa30461
105 files changed
+241
-314
No files matched your search
@@ -95,8 +95,7 @@ def _parse_skyhub_response(data_str):
|
||||
pattmatch = re.search("attach_dev = '(.*)'", data_str)
|
||||
if pattmatch is None:
|
||||
raise OSError(
|
||||
"Error: Impossible to fetch data from"
|
||||
+ " Sky Hub. Try to reboot the router."
|
||||
"Error: Impossible to fetch data from Sky Hub. Try to reboot the router."
|
||||
)
|
||||
patt = pattmatch.group(1)
|
||||
|
||||
@@ -107,8 +106,6 @@ def _parse_skyhub_response(data_str):
|
||||
if _MAC_REGEX.match(dvc[1]):
|
||||
devices[dvc[1]] = dvc[0]
|
||||
else:
|
||||
raise RuntimeError(
|
||||
"Error: MAC address " + dvc[1] + " not in correct format."
|
||||
)
|
||||
raise RuntimeError(f"Error: MAC address {dvc[1]} not in correct format.")
|
||||
|
||||
return devices
|
||||
Reference in new issue
Block a user