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

Unified Diff: chrome/test/pyautolib/chromeos/suid_actions.py

Issue 8680018: Fix python scripts in src/chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/pyautolib/chromeos/file_browser.py ('k') | chrome/test/pyautolib/chromeos_network.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/chromeos/suid_actions.py
diff --git a/chrome/test/pyautolib/chromeos/suid_actions.py b/chrome/test/pyautolib/chromeos/suid_actions.py
old mode 100644
new mode 100755
index 77f771f1bf6e8d02a2842fba7b0cd08191292065..824b8ccdc2495631f81ffe7aa953eeebb7b7f88c
--- a/chrome/test/pyautolib/chromeos/suid_actions.py
+++ b/chrome/test/pyautolib/chromeos/suid_actions.py
@@ -1,5 +1,4 @@
-#!/usr/bin/python
-
+#!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -16,6 +15,7 @@ Usage:
import optparse
import os
import shutil
+import sys
class SuidAction(object):
@@ -29,7 +29,6 @@ class SuidAction(object):
if not self._options.action:
raise RuntimeError('No action specified.')
-
def Run(self):
self._ParseArgs()
assert os.geteuid() == 0, 'Needs superuser privileges.'
@@ -37,6 +36,7 @@ class SuidAction(object):
assert handler and callable(handler), \
'No handler for %s' % self._options.action
handler()
+ return 0
## Actions ##
@@ -54,5 +54,4 @@ class SuidAction(object):
if __name__ == '__main__':
- suid_action = SuidAction()
- suid_action.Run()
+ sys.exit(SuidAction().Run())
« no previous file with comments | « chrome/test/pyautolib/chromeos/file_browser.py ('k') | chrome/test/pyautolib/chromeos_network.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698