LaurentCR / pylast

Automatically exported from code.google.com/p/pylast
Apache License 2.0
0 stars 0 forks source link

Python version check wrong syntax #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please type example code that produces the issue:
import pylast

What is the expected output? What do you see instead?
Expected:
Real:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pylast.py", line 36, in <module>
    if sys.version_info.major == 3:
AttributeError: 'tuple' object has no attribute 'major'

What versions of Pylast and Python are you using?
2.6.5 (r265:79063, Apr 16 2010, 13:09:56) \n[GCC 4.4.3]
Latest svn checkout of pylast

Please provide any additional information below.
I fixed it by checking sys.version_info[0] instead of sys.version_info.major. I 
checked this on python 3 too, and it works there too.

Original issue reported on code.google.com by vinc...@vincentkriek.nl on 6 Jan 2011 at 11:11

Attachments:

GoogleCodeExporter commented 9 years ago
I can confirm this bug. I just catched it (running on Python 2.6.6).

Original comment by gjallarh...@gmail.com on 6 Jan 2011 at 2:31

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r239.

Original comment by amr.hassan on 6 Jan 2011 at 3:02