Update xiaomi.py (#15136)
* Update xiaomi.py Minor logic fix for Xiaofang cameras. * Removed whitespace * Removed whitespacepull/15143/head
parent
e681a7929c
commit
c8458fd7c5
|
@ -104,10 +104,6 @@ class XiaomiCamera(Camera):
|
||||||
|
|
||||||
dirs = [d for d in ftp.nlst() if '.' not in d]
|
dirs = [d for d in ftp.nlst() if '.' not in d]
|
||||||
if not dirs:
|
if not dirs:
|
||||||
if self._model == MODEL_YI:
|
|
||||||
_LOGGER.warning("There don't appear to be any uploaded videos")
|
|
||||||
return False
|
|
||||||
elif self._model == MODEL_XIAOFANG:
|
|
||||||
_LOGGER.warning("There don't appear to be any folders")
|
_LOGGER.warning("There don't appear to be any folders")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -117,7 +113,7 @@ class XiaomiCamera(Camera):
|
||||||
except error_perm as exc:
|
except error_perm as exc:
|
||||||
_LOGGER.error('Unable to find path: %s - %s', first_dir, exc)
|
_LOGGER.error('Unable to find path: %s - %s', first_dir, exc)
|
||||||
return False
|
return False
|
||||||
|
if self._model == MODEL_XIAOFANG:
|
||||||
dirs = [d for d in ftp.nlst() if '.' not in d]
|
dirs = [d for d in ftp.nlst() if '.' not in d]
|
||||||
if not dirs:
|
if not dirs:
|
||||||
_LOGGER.warning("There don't appear to be any uploaded videos")
|
_LOGGER.warning("There don't appear to be any uploaded videos")
|
||||||
|
|
Loading…
Reference in New Issue