When you remove the indent you are using a while:else block. The else is being attached to while which means it will run if your while condition is false.
while True:
##some looping code
else:
##code to run when while is false
When you indent that line of code you attach the else to if making an if:else block. In this case else is executed when if is false.
if True:
##code to run if true
else
##code to run if false
Blocks of code in python follow the same indentation. Because "else" is part of the "while" block, it has to be at the same tab position for it to work, and looking at your code, I'd say the while:else block is what you intended. :)