Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Issue 3033042: Switching from os.uname to platform.uname, since os.uname isn't available on... (Closed)

Created:
10 years, 4 months ago by bradn
Modified:
9 years, 7 months ago
Reviewers:
nsylvain
CC:
chromium-reviews
Visibility:
Public.

Description

Switching from os.uname to platform.uname, since os.uname isn't available on Windows. Adding extra processor field this makes available. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=54250

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -2 lines) Patch
M command_wrapper/bin/command_wrapper.py View 3 chunks +3 lines, -1 line 0 comments Download
M command_wrapper/command_wrapper_web.py View 2 chunks +2 lines, -1 line 0 comments Download
M command_wrapper/viewer.html View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
bradn
10 years, 4 months ago (2010-07-30 01:05:14 UTC) #1
nsylvain
10 years, 4 months ago (2010-07-30 01:08:04 UTC) #2
lgtm

On Thu, Jul 29, 2010 at 6:05 PM, <bradnelson@google.com> wrote:

> Reviewers: nsylvain,
>
> Description:
> Switching from os.uname to platform.uname, since os.uname isn't available
> on
> Windows. Adding extra processor field this makes available.
>
> BUG=None
> TEST=None
>
>
>
> Please review this at http://codereview.chromium.org/3033042/show
>
> SVN Base: svn://chrome-svn/chrome/trunk/tools/
>
> Affected files:
>  M     command_wrapper/bin/command_wrapper.py
>  M     command_wrapper/command_wrapper_web.py
>  M     command_wrapper/viewer.html
>
>
> Index: command_wrapper/bin/command_wrapper.py
> ===================================================================
> --- command_wrapper/bin/command_wrapper.py      (revision 54172)
> +++ command_wrapper/bin/command_wrapper.py      (working copy)
> @@ -14,6 +14,7 @@
>
>  import optparse
>  import os
> +import platform
>  import subprocess
>  import sys
>  import time
> @@ -35,7 +36,7 @@
>     stderr: text of stderr
>     runtime: command runtime in seconds
>   """
> -  uname = os.uname()
> +  uname = platform.uname()
>   params = urllib.urlencode({
>       'attempt': str(attempt),
>       'cwd': os.getcwd(),
> @@ -51,6 +52,7 @@
>       'uname_release': uname[2],
>       'uname_version': uname[3],
>       'uname_machine': uname[4],
> +      'uname_processor': uname[5],
>   })
>   f = urllib.urlopen(options.logurl, params)
>   f.read()
> Index: command_wrapper/command_wrapper_web.py
> ===================================================================
> --- command_wrapper/command_wrapper_web.py      (revision 54172)
> +++ command_wrapper/command_wrapper_web.py      (working copy)
> @@ -27,7 +27,7 @@
>   uname_release = db.StringProperty()
>   uname_version = db.StringProperty()
>   uname_machine = db.StringProperty()
> -  uname_machine = db.StringProperty()
> +  uname_processor = db.StringProperty()
>
>
>  class LogHandler(webapp.RequestHandler):
> @@ -50,6 +50,7 @@
>     ci.uname_release = str(self.request.get('uname_release'))
>     ci.uname_version = str(self.request.get('uname_version'))
>     ci.uname_machine = str(self.request.get('uname_machine'))
> +    ci.uname_processor = str(self.request.get('uname_processor'))
>     ci.put()
>
>
> Index: command_wrapper/viewer.html
> ===================================================================
> --- command_wrapper/viewer.html (revision 54172)
> +++ command_wrapper/viewer.html (working copy)
> @@ -43,6 +43,7 @@
>         <th align="left">uname_release</th>
>         <th align="left">uname_version</th>
>         <th align="left">uname_machine</th>
> +        <th align="left">uname_processor</th>
>       </tr>
>       {% for item in items %}
>       <tr>
> @@ -70,6 +71,7 @@
>         <td>{{ item.uname_release|escape }}</td>
>         <td>{{ item.uname_version|escape }}</td>
>         <td>{{ item.uname_machine|escape }}</td>
> +        <td>{{ item.uname_processor|escape }}</td>
>       </tr>
>       {% endfor %}
>     </table>
>
>
>

Powered by Google App Engine
This is Rietveld 408576698