for the following code:
if __name__ == '__main__':
min_version = (2,5)
current_version = sys.version_info
if (current_version[0] > min_version[0] or
current_version[0] == min_version[0] and
current_version[1] >= min_version[1]):
else:
print "Your python interpreter is too old. Please consider upgrading."
config = ConfigParser.ConfigParser()
config.read('.hg/settings.ini')
user = config.get('user','name')
password = config.get('user','password')
resource_name = config.get('resource','name')
server_url = config.get('jira','server')
main()
i get error:
else:
^
IndentationError: expected an indented block
You don’t have anything in the
ifside of your if statement. Your code skips directly to theelse, while python was expecting a block (an “indented block”, to be precise, which is what it is telling you)At the very least, you need a block with just a ‘pass’ statement, like this:
In that case, though, if you really don’t ever want to do anything in the
ifside, then it would be clearer to do this: