amluto / virtme

An easy way to virtualize the running system
GNU General Public License v2.0
330 stars 66 forks source link

AttributeError: 'tuple' object has no attribute 'release' #4

Closed covracer closed 10 years ago

covracer commented 10 years ago
./virtme-run
Traceback (most recent call last):
  File "./virtme-run", line 12, in <module>
    from virtme.commands import run
  File "/home/cov/prj/virtme/virtme/commands/run.py", line 97, in <module>
    _ARGPARSER = make_parser()
  File "/home/cov/prj/virtme/virtme/commands/run.py", line 31, in make_parser
    const=uname.release, default=None, metavar='VERSION',
AttributeError: 'tuple' object has no attribute 'release'

From ipython3:

In [4]: os.uname()
Out[4]: 
('Linux',
 'RoyalPenguin',
 '3.8.0-44-generic',
 '#66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014',
 'x86_64')

In [5]: os.uname().release
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/home/cov/prj/virtme/<ipython-input-5-583f2db64b53> in <module>()
----> 1 os.uname().release

AttributeError: 'tuple' object has no attribute 'release'

In [6]: os.uname()[3]
Out[6]: '#66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014'
amluto commented 10 years ago

What version of Python is this?

covracer commented 10 years ago

D'oh. 3.2. Sorry for the noise.

amluto commented 10 years ago

To minimize future confusion, I committed:

b24ff78734d4114638c307bab1fd9525ad313357

If you want to contribute a shutil.which() replacement that works on Python 3.2, I would apply it :)