summaryrefslogtreecommitdiffstats
path: root/editor.py
diff options
context:
space:
mode:
authorRenaud Paquay <rpaquay@google.com>2016-11-11 14:25:29 -0800
committerRenaud Paquay <rpaquay@google.com>2017-08-31 13:49:36 -0700
commit010fed771183c23c0e7d04a4e7292782f68de9db (patch)
tree438b928fa1adaa7105d88462299513ca59c47c9f /editor.py
parente8595e9df7980b0b7d9111de43d294c4439d474c (diff)
downloadgit-repo-010fed771183c23c0e7d04a4e7292782f68de9db.tar.gz
Replace all os.remove calls
os.remove raises an exception when deleting read-only files on Windows. Replace all calls with calls to platform_utils.remove, which deals with deals with that issue. Change-Id: I4dc9e0c9a36b4238880520c69f5075eca40f3e66
Diffstat (limited to 'editor.py')
-rw-r--r--editor.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor.py b/editor.py
index 883a1a83..96d7ce4c 100644
--- a/editor.py
+++ b/editor.py
@@ -21,6 +21,7 @@ import subprocess
21import tempfile 21import tempfile
22 22
23from error import EditorError 23from error import EditorError
24import platform_utils
24 25
25class Editor(object): 26class Editor(object):
26 """Manages the user's preferred text editor.""" 27 """Manages the user's preferred text editor."""
@@ -107,4 +108,4 @@ least one of these before using this command.""", file=sys.stderr)
107 finally: 108 finally:
108 if fd: 109 if fd:
109 os.close(fd) 110 os.close(fd)
110 os.remove(path) 111 platform_utils.remove(path)