Last Comment Bug 781445 - jstests.py: AttributeError: 'datetime.timedelta' object has no attribute 'total_seconds'
: jstests.py: AttributeError: 'datetime.timedelta' object has no attribute 'tot...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All Mac OS X
: -- normal (vote)
: mozilla17
Assigned To: Terrence Cole [:terrence]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-09 00:18 PDT by Luke Wagner [:luke]
Modified: 2012-08-09 19:57 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v0 (2.08 KB, patch)
2012-08-09 10:55 PDT, Terrence Cole [:terrence]
benjamin: review+
Details | Diff | Splinter Review

Description Luke Wagner [:luke] 2012-08-09 00:18:44 PDT
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'
Comment 1 Nicolas B. Pierron [:nbp] 2012-08-09 10:50:07 PDT
I had the same thing with python 2.6.7, but not with python 2.7.2.  What is your version of python ?
Comment 2 Terrence Cole [:terrence] 2012-08-09 10:55:01 PDT
Created attachment 650618 [details] [diff] [review]
v0

I accidentally added a 2.7 only feature when implementing tasks_unix.py.
Comment 3 :Benjamin Peterson 2012-08-09 11:01:13 PDT
Comment on attachment 650618 [details] [diff] [review]
v0

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

Everyone should upgrade their Pythons!
Comment 4 Terrence Cole [:terrence] 2012-08-09 11:40:54 PDT
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
Comment 5 Ryan VanderMeulen [:RyanVM] 2012-08-09 19:57:38 PDT
https://hg.mozilla.org/mozilla-central/rev/604554b4a1df

Note You need to log in before you can comment on or make changes to this bug.