from canis import siriusxm, spotify, oauth

def main():
    try:
        current = siriusxm.get_currently_playing('siriusxmu')
        spotify_id = spotify.id_for_song(current)
        print(current, spotify_id)
    except Exception, e:
        print "Error {}".format(e)

if __name__ == "__main__":
    oauth.app.run(debug=True)
    main()

from canis import siriusxm, spotify, oauth

def main():
    try:
        current = siriusxm.get_currently_playing('siriusxmu')
        spotify_id = spotify.id_for_song(current)
        print(current, spotify_id)
    except Exception, e:
        print "Error {}".format(e)

if __name__ == "__main__":
    oauth.app.run()
    main()

Remove debug mode on flask
Remove debug mode on flask
