Update __init__.py

This commit is contained in:
htmltiger 2022-10-07 11:44:20 +01:00 committed by GitHub
parent ff7ca00542
commit e534e97891
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,10 +86,10 @@ async def websocket_create(hass, connection, msg):
if not os.path.isdir(dirnm):
os.makedirs(dirnm, exist_ok=True)
try:
statres = os.stat(fullpath)
mode = statres.st_mode
uid = statres.st_uid
gid = statres.st_gid
stat_res = os.stat(fullpath)
mode = stat_res.st_mode
uid = stat_res.st_uid
gid = stat_res.st_gid
except:
mode = 0o666
uid = 0