bug 661908 - work around stupid Python 2.5 bug. r=bustage
authorTed Mielczarek <ted.mielczarek@gmail.com>
Fri, 25 May 2012 14:02:54 -0400
changeset 94969 a8e08361c00efce2e2b71b80bd5b019d8be43f33
parent 94968 49b7aa3593de872e05b53bd0f4b87f275f4ab681
child 94970 a172444cca112780f56c2bf94ad44760955c1ebe
push id9893
push usertmielczarek@mozilla.com
push dateFri, 25 May 2012 18:03:07 +0000
treeherdermozilla-inbound@a8e08361c00e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs661908
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 661908 - work around stupid Python 2.5 bug. r=bustage
build/link.py
--- a/build/link.py
+++ b/build/link.py
@@ -1,14 +1,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import with_statement
-import os, platform, subprocess, sys, threading, time
+import os, subprocess, sys, threading, time
 from win32 import procmem
 
 def measure_vsize_threadfunc(proc, output_file):
     """
     Measure the virtual memory usage of |proc| at regular intervals
     until it exits, then print the maximum value and write it to
     |output_file|.
     """
@@ -31,15 +31,15 @@ def measure_link_vsize(output_file, args
     t.start()
     # Wait for the linker to finish.
     exitcode = proc.wait()
     # ...and then wait for the background thread to finish.
     t.join()
     return exitcode
 
 if __name__ == "__main__":
-    if platform.system() != "Windows":
+    if sys.platform != "win32":
         print >>sys.stderr, "link.py is only for use on Windows!"
         sys.exit(1)
     if len(sys.argv) < 3:
         print >>sys.stderr, "Usage: link.py <output filename> <commandline>"
         sys.exit(1)
     sys.exit(measure_link_vsize(sys.argv[1], sys.argv[2:]))