Merge pull request #36 from stuertz/35-unbound-local-error

fix: unitialized variable
This commit is contained in:
Thomas Luther 2024-02-21 10:41:25 +01:00 committed by GitHub
commit c2ebb7bbcb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -86,6 +86,8 @@ async def main() -> None: # noqa: C901
else:
use_file = True
testfolder = exampleslist[selection - 1]
else:
use_file = False
try:
async with ClientSession() as websession:
myapi = api.AnkerSolixApi(USER, PASSWORD, COUNTRY, websession, _LOGGER)
@ -264,4 +266,4 @@ if __name__ == "__main__":
except KeyboardInterrupt:
CONSOLE.info("\nAborted!")
except Exception as exception:
CONSOLE.info("%s: %s", type(exception), exception)
CONSOLE.exception("%s: %s", type(exception), exception)