jstests.py: AttributeError: 'datetime.timedelta' object has no attribute 'total_seconds'

RESOLVED FIXED in mozilla17

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: luke, Assigned: terrence)

Tracking

unspecified
mozilla17
All
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
I'm seeing this on OSX 10.6:

/moz/mi/js/src/tests $ jstests.py ../d/js
[   0|   0|   0| 153]   4% =>                                         |   0.0sTraceback (most recent call last):
  File "./jstests.py", line 299, in <module>
    sys.exit(main())
  File "./jstests.py", line 289, in main
    run_tests(options, test_list, results)
  File "./jstests.py", line 26, in run_tests
    completed = run_all_tests(tests, results, options)
  File "/Volumes/data/moz/mi/js/src/tests/lib/tasks_unix.py", line 191, in run_all_tests
    timeout = get_max_wait(tasks, results, options.timeout)
  File "/Volumes/data/moz/mi/js/src/tests/lib/tasks_unix.py", line 55, in get_max_wait
    wait = wait.total_seconds()
AttributeError: 'datetime.timedelta' object has no attribute 'total_seconds'
I had the same thing with python 2.6.7, but not with python 2.7.2.  What is your version of python ?
(Assignee)

Comment 2

5 years ago
Created attachment 650618 [details] [diff] [review]
v0

I accidentally added a 2.7 only feature when implementing tasks_unix.py.
Assignee: general → terrence
Status: NEW → ASSIGNED
Attachment #650618 - Flags: review?(bpeterson)

Comment 3

5 years ago
Comment on attachment 650618 [details] [diff] [review]
v0

Review of attachment 650618 [details] [diff] [review]:
-----------------------------------------------------------------

Everyone should upgrade their Pythons!
Attachment #650618 - Flags: review?(bpeterson) → review+
(Assignee)

Comment 4

5 years ago
The REHL buildbots have Python2.5.  Fortunately, the only time buildbots interact with this script is when they call --make-manifests: that one path is very much 2.5 only.

Generally stuff that does not run in --make-manifests runs fine under whatever python version is on my machine :-).  Although, I will hustle to fix any bustage if anyone notices and it's a reasonable request.  In this case, installing stuff on MacOS is a pita and 2.6 isn't that old and it's a trivial and *stable* method to copy into our sources.

Pushed:
https://hg.mozilla.org/integration/mozilla-inbound/rev/604554b4a1df
https://hg.mozilla.org/mozilla-central/rev/604554b4a1df
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.