Logo Hardware.com.br
Roney rogerio
Roney rogeri... Membro Senior Registrado
315 Mensagens 4 Curtidas

[Resolvido] Dúvida em Python

#1 Por Roney rogeri... 20/05/2014 - 22:43
simplesmente não consigo colocar o ultimo if da o erro "unindent does not match any outer indentation level", alguém me ajuda, sem o if funciona, não sei essa linguagem, se alguém poder me falar a forma correta de fazer eu agradeço

assim não funciona

def fa():
loginfile = os.path.join(profile, 'login'
username = open(loginfile, "r&quot.read()
passwordfile = os.path.join(profile, 'password'
password = open(passwordfile, "r&quot.read()
if username == "" or password == "":
dologin()
else:
success, tempo, erro = login(username, password, cookiepath)
if tempo=='0' and erro=='':
sys.exit(aviso('vencido')
elif not erro=='':
falha = aviso(erro)
if (falha == True):
dologin()
elif not tempo=='0':
getSources()
if tempo>1:
dia = 'dias'
else:
dia = 'dia'
aviso('Voce ainda pode usar por '+tempo+dia+''
assim funciona

def fa():
loginfile = os.path.join(profile, 'login'
username = open(loginfile, "r&quot.read()
passwordfile = os.path.join(profile, 'password'
password = open(passwordfile, "r&quot.read()
if username == "" or password == "":
dologin()
else:
success, tempo, erro = login(username, password, cookiepath)
if tempo=='0' and erro=='':
sys.exit(aviso('vencido')
elif not erro=='':
falha = aviso(erro)
if (falha == True):
dologin()
elif not tempo=='0':
getSources()
dia = ' dia'
dd = aviso('Voce ainda pode usar por '+tempo+dia+''
© 1999-2025 Hardware.com.br. Todos os direitos reservados.
Imagem do Modal