[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

eryksun report at bugs.python.org
Fri Jan 2 20:49:43 CET 2015


eryksun added the comment:

> if (not version.GetFileVersionInfoW(name, None, size, ver_block) or
>        not ver_block):

Arrays don't implement __bool__ and have fixed __len__, so ver_block is always True. You could look at ver_block[0] or ver_block.value (i.e. the C string value).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19143>
_______________________________________


More information about the Python-bugs-list mailing list