python写unix口令破解机代码报错(好像是对齐问题可是我确定对齐了啊)

import crypt
def testPass(cryptPass):
salt=cryptPass[0:2]
dictFile=open('dictionary.txt','r')
for word in dictFile.readlines():
word=word.strip('\n')
cryptWord=crypt.crypt(word,salt)
if(cryptWord==cryptPass):
print "+ found password : "+word+"\n"
return
print"-Password Not Found.\n"
return
def main():
passFile=open('passwords.txt')
for line in passFile.readlines():
if ":" in line:
user=line.split(':')[0]
cryptPass=line.split(':')[1].strip(' ')
print "* Cracking password for: "+user
testPass(cryptPass)
if name=="__main__":
main()

报错截图:
图片说明

我用的ubuntu14运行的,代码是从Python绝技运用python成为顶级黑客 这本书上敲得,麻烦各位大神给指点一下,谢谢了~

图片说明

直接贴上的代码看不出。。截个图(https://img-ask.csdn.net/upload/201703/14/1489481470_378224.jpg)