Closed
Bug 615008
Opened 14 years ago
Closed 14 years ago
Find alternative for platform.linux_distribution, which requires at least Python 2.6
Categories
(Testing Graveyard :: Mozmill, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: Aleksej, Assigned: whimboo)
References
Details
(Keywords: regression, Whiteboard: [MozmillTestday][mozmill-1.5.2+])
Attachments
(2 files)
(deleted),
patch
|
k0scist
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
k0scist
:
review+
|
Details | Diff | Splinter Review |
Running with Python 2.5 can cause a crash, because "linux_distribution" was not available before Python 2.6: http://docs.python.org/library/platform.html?highlight=linux_distribution#platform.linux_distribution
INFO Passed: 2
INFO Failed: 2
INFO Skipped: 0
Traceback (most recent call last):
File "/usr/bin/mozmill", line 8, in <module>
load_entry_point('mozmill==1.5.1', 'console_scripts', 'mozmill')()
File "/usr/lib/python2.5/site-packages/mozmill/__init__.py", line 811, in cli
CLI().run()
File "/usr/lib/python2.5/site-packages/mozmill/__init__.py", line 776, in run
self.mozmill.report(self.options.report)
File "/usr/lib/python2.5/site-packages/mozmill/__init__.py", line 473, in report
results = self.get_report()
File "/usr/lib/python2.5/site-packages/mozmill/__init__.py", line 418, in get_report
report['system_info'] = self.get_platform_information()
File "/usr/lib/python2.5/site-packages/mozmill/__init__.py", line 364, in get_platform_information
(distro, version, codename) = platform.linux_distribution()
AttributeError: 'module' object has no attribute 'linux_distribution'
Assignee | ||
Comment 1•14 years ago
|
||
My fault when I have implemented bug 562822. We still support Python 2.5, and I have simply taken it over from Heather's template.
Assignee: nobody → hskupin
Blocks: 562822
Keywords: regression
Whiteboard: [MozmillTestday] → [MozmillTestday][mozmill-1.5.2?]
Assignee | ||
Updated•14 years ago
|
Summary: uses platform.linux_distribution, which requires at least Python 2.6 → Find alternative for platform.linux_distribution, which requires at least Python 2.6
I think this can be easily solved by changing platform.linux_distribution() to platform.dist(). Taking.
Whiteboard: [MozmillTestday][mozmill-1.5.2?] → [MozmillTestday][mozmill-1.5.2+]
Assignee | ||
Comment 3•14 years ago
|
||
As mentioned lets use the old but deprecated version. Should be fine at least until we support Python 3.
Attachment #495981 -
Flags: review?(jhammel)
Comment 4•14 years ago
|
||
Comment on attachment 495981 [details] [diff] [review]
Patch v1
Works for me here. I haven't tested on all python versions. For 2.0, I'd like to see this as part of the mozinfo package (bug 606524)
Attachment #495981 -
Flags: review?(jhammel) → review+
Assignee | ||
Comment 5•14 years ago
|
||
Landed on hotfix-1.5.2 as:
https://github.com/mozautomation/mozmill/commit/e0f995a10150d64f78dfff937b59279bbc2ff5b4
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•14 years ago
|
||
> Works for me here. I haven't tested on all python versions. For 2.0, I'd like
> to see this as part of the mozinfo package (bug 606524)
There is a lot more stuff to do for a final implementation. This patch simply updates the code inside of info.py to make sure we do not fail.
Attachment #497645 -
Flags: review?(jhammel)
Updated•14 years ago
|
Attachment #497645 -
Flags: review?(jhammel) → review+
Assignee | ||
Comment 7•14 years ago
|
||
Landed on master:
https://github.com/mozautomation/mozmill/commit/4c155534445c306fa144d5e6e1b95b211a429b04
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•14 years ago
|
||
Aleksej, could you please verify that it now works? We have pushed Mozmill 1.5.2 RC2 today to pypi, so a "pip install --upgrade mozmill" should update you to that version. Thanks.
Updated•8 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•