1
while 1:
    try:
        print "It is getting blocked here"
        jsonResponse=urlopen(request).read()
        print "It is not reaching here"
        break
    except:

        tries+=1
        print "retry after 10 seconds",tries
        time.sleep(10)
        if tries>5:
            print "Some Other time"
            raise Exception('Server did not respond

This code is part of a larger thread representing a User Interface A peculiar thing is it works fine when I run it using python but when I build it using cx_freeze and then run the .exe it blocks at urlopen()

anmolp95
  • 11
  • 2

0 Answers0