if os.path.exists('/proc/' + pid + '/exe') is True: -> if os.path.exists('/proc/' + pid + '/exe') :