Simple script written in python to build an os independent truecrypt encrypted usb-stick containing a portable thunderbird, enigmail, torbirdy and vidalia.
using the releases.mozilla.org mirror returns sometimes with a timeout creating a 4k file. we need to check if the file really gets downloaded. we probably can use the urlretrieve internal magic to do this:
Changed in version 2.5: urlretrieve() will raise ContentTooShortError when it
detects that the amount of data available was less than the expected amount
(which is the size reported by a Content-Length header). This can occur, for
example, when the download is interrupted.
The Content-Length is treated as a lower bound: if there’s more data to read,
urlretrieve() reads more data, but if less data is available, it raises the
exception.
You can still retrieve the downloaded data in this case, it is stored in the
content attribute of the exception instance.
If no Content-Length header was supplied, urlretrieve() can not check the size
of the data it has downloaded, and just returns it. In this case you just have
to assume that the download was successful.
using the releases.mozilla.org mirror returns sometimes with a timeout creating a 4k file. we need to check if the file really gets downloaded. we probably can use the urlretrieve internal magic to do this: