My code is throwing a SyntaxError: invalid syntax error at the last else statement (second to last line in code below). Can anyone see what is causing this? I'm running Python 2.7 on CentOS.
def mintosec(time):
    foo = time.split(':')
    if re.match('o|O',foo[0]) == True: #check to see if any zeros are incorrectly labled as 'o's and replace if so
            div = list(foo[0])
            if div[0] == 'o' or 'O':
                    new = 0
            else:
                    new = div[0]
            if div[1] == 'o' or 'O':
                    new1 = 0
            else:
                    new1 = div[1]
            bar = int(str(new)+str(new1))*60
    else:
            bar = int(foo[0]) * 60
 
     
     
     
    