Good day I have the following snippet:
#! /usr/bin/python
#! /usr/bin/python3
from sys import version_info
import logging
py3 = version_info[0] > 2
if py3:
name = input('What is your name?: ')
verify_user(name)
else:
name = raw_input('What is your name?: ')
verify_user(name)
def verify_user(name):
if name is not 'My Admin':
logging.warning('What the hell are you doing in here ???')
else:
logging.info('Welcome Dear Admin')
When I run it through the shell doing: ./log.py, I'm receiving the following error:
verify_user is not define.
Not sure what is going on. I have defined the verify_user(). Any help will be really appreciated.