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

Unified Diff: client/bin/site_crash_test.py

Issue 5041001: Fix cross-device link errors by using shutil.move instead of os.rename (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: Created 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/bin/site_crash_test.py
diff --git a/client/bin/site_crash_test.py b/client/bin/site_crash_test.py
index 9f2d52e1614ca0dc3c1a6d9a005020a3ec1c5c54..cc3e97f980323167297634351d261bf9c273ba6f 100644
--- a/client/bin/site_crash_test.py
+++ b/client/bin/site_crash_test.py
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import logging, os, re
+import logging, os, re, shutil
from autotest_lib.client.bin import site_log_reader, site_utils, test
from autotest_lib.client.common_lib import error, utils
@@ -85,13 +85,15 @@ class CrashTest(test.test):
def _push_consent(self):
if os.path.exists(self._CONSENT_FILE):
- os.rename(self._CONSENT_FILE, self._get_pushed_consent_file_path())
+ shutil.move(self._CONSENT_FILE,
+ self._get_pushed_consent_file_path())
def _pop_consent(self):
self._set_consent(False)
if os.path.exists(self._get_pushed_consent_file_path()):
- os.rename(self._get_pushed_consent_file_path(), self._CONSENT_FILE)
+ shutil.move(self._get_pushed_consent_file_path(),
+ self._CONSENT_FILE)
def _get_crash_dir(self, username):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698