Improve string formatting v5 (#33697)
* Improve string formatting v5 * Address review comments
This commit is contained in:
1 parent
39336d3ea3
commit
fca90a8ddc
46 files changed
+221
-252
No files matched your search
@@ -110,14 +110,9 @@ class YiCamera(Camera):
|
||||
|
||||
await ftp.quit()
|
||||
self._is_on = True
|
||||
return "ftp://{}:{}@{}:{}{}/{}/{}".format(
|
||||
self.user,
|
||||
self.passwd,
|
||||
self.host,
|
||||
self.port,
|
||||
self.path,
|
||||
latest_dir,
|
||||
videos[-1],
|
||||
return (
|
||||
f"ftp://{self.user}:{self.passwd}@{self.host}:"
|
||||
f"{self.port}{self.path}/{latest_dir}/{videos[-1]}"
|
||||
)
|
||||
except (ConnectionRefusedError, StatusCodeError) as err:
|
||||
_LOGGER.error("Error while fetching video: %s", err)
|
||||
|
||||
Reference in new issue
Block a user