Undefined variable 'die'
26 logging.warning(
27 f"Session file is locked.{e}"
28 )
29 die()30 except (errors.NotAcceptable, errors.Unauthorized) as e:
31 logging.error(
32 f"{e.__class__.__name__}: {e}\n"
Undefined variable 'die'
32 f"{e.__class__.__name__}: {e}\n"
33 f"Get help"
34 )
35 die()36
37 success_handlers = 0
38 failed_handlers = 0
Description
The variable name is not defined where it is used. This will lead to an error during the runtime. Make sure there is no typo. If the name was supposed to be imported, verify that you've actually imported the name.
Bad practice
import os.path
if os.path.exits('setup.cfg'): # misspelled `exists`
print('Found config file')
Preferred:
import os.path
if os.path.exists('setup.cfg'):
print('Found config file')