From ad1abcb556bfff2744928a8f29d216aee43fdbe3 Mon Sep 17 00:00:00 2001 From: Renaud Paquay Date: Tue, 1 Nov 2016 11:34:55 -0700 Subject: Port os.rename calls to work on Windows os.rename fails on Windows if the destination exists, so replace os.rename to platform_utils.rename which handles the platform differences. Change-Id: I15a86f10f65eedee5b003b80f88a0c28a3e1aa48 --- project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'project.py') diff --git a/project.py b/project.py index ba18337b..e8de4842 100644 --- a/project.py +++ b/project.py @@ -63,7 +63,7 @@ def _lwrite(path, content): fd.close() try: - os.rename(lock, path) + platform_utils.rename(lock, path) except OSError: os.remove(lock) raise @@ -2198,7 +2198,7 @@ class Project(object): if os.path.exists(tmpPath): if curlret == 0 and self._IsValidBundle(tmpPath, quiet): - os.rename(tmpPath, dstPath) + platform_utils.rename(tmpPath, dstPath) return True else: os.remove(tmpPath) -- cgit v1.2.3-54-g00ecf