Post
Topic
Board Armory
Re: Armory - Discussion Thread
by
etotheipi
on 15/07/2012, 21:54:56 UTC
Hi,

I'm not a Python expert, but according to the following link, using a 'for' loop rather than readlines() is a better way to iterate over the file:

http://stackoverflow.com/questions/4533884/is-using-readlines-in-python-bad-code/4534056#4534056

Interesting you posted this just as I finished compiling with another solution.  I found a post of someone reporting the exact same problem, and it was that there is a near-infinite timeout set at the socket layer that has to be overridden explicitly (I specify a urlopen timeout, but not socket.read timeout):

Quote
         import urllib2
         import socket
         socket.setdefaulttimeout(CLI_OPTIONS.nettimeout)

         versionLines = urllib2.urlopen(HTTP_VERSION_FILE, timeout=CLI_OPTIONS.nettimeout)
         versionLines = versionLines.readlines()


However, since I can't reproduce the problem, I had to recompile the Win64 version and replace the previous one.  @traderjoe:  please re-download and reinstall.  Tell me if the problem went away.  The links below are the same as on the original post, re-linked here for convenience.


Windows 64-bit installer
Windows 32-bit installer
Linux 64-bit Debian package
Linux 32-bit Debian package