Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 643768 - =dev-util/catalyst-3.0.1: can't run with python 2.7
Summary: =dev-util/catalyst-3.0.1: can't run with python 2.7
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-07 10:50 UTC by Yuta SATOH
Modified: 2018-10-11 14:33 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sample patch for catalyst/main.py (file_643768.txt,584 bytes, patch)
2018-01-07 10:51 UTC, Yuta SATOH
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta SATOH 2018-01-07 10:50:22 UTC
Python 2.7 doesn't have os.uname().sysname.
Could you please change it to os.uname()[0]?

Thanks.

# catalyst -C target=snapshot version_stamp=20180107
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/catalyst", line 37, in <module>
    main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/catalyst/main.py", line 285, in main
    return _main(parser, opts)
  File "/usr/lib/python2.7/site-packages/catalyst/main.py", line 441, in _main
    if os.uname().sysname in  ["Linux", "linux"]:
AttributeError: 'tuple' object has no attribute 'sysname'


Reproducible: Always
Comment 1 Yuta SATOH 2018-01-07 10:51:12 UTC
Created attachment 513614 [details, diff]
sample patch for catalyst/main.py

This patch changes it to os.uname()[0] and a simple code.
Comment 2 Ben Kohler gentoo-dev 2018-10-11 14:33:19 UTC
Dropped python2_7 from PYTHON_COMPAT in >=3.0.2