'latest_dir' referenced before assignment (#19952)

* 'latest_dir' referenced before assignment

local variable 'latest_dir' referenced before assignment

* Better fix
This commit is contained in:
Sriram Vaidyanathan 2019-01-12 10:14:01 +05:30 committed by Paulus Schoutsen
parent ba21608042
commit 418fa226e6

View File

@ -107,7 +107,7 @@ class XiaomiCamera(Camera):
_LOGGER.warning("There don't appear to be any folders") _LOGGER.warning("There don't appear to be any folders")
return False return False
first_dir = dirs[-1] first_dir = latest_dir = dirs[-1]
try: try:
ftp.cwd(first_dir) ftp.cwd(first_dir)
except error_perm as exc: except error_perm as exc: