diff options
author | Renaud Paquay <rpaquay@google.com> | 2016-11-11 14:25:29 -0800 |
---|---|---|
committer | Renaud Paquay <rpaquay@google.com> | 2017-08-31 13:49:36 -0700 |
commit | 010fed771183c23c0e7d04a4e7292782f68de9db (patch) | |
tree | 438b928fa1adaa7105d88462299513ca59c47c9f /editor.py | |
parent | e8595e9df7980b0b7d9111de43d294c4439d474c (diff) | |
download | git-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.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -21,6 +21,7 @@ import subprocess | |||
21 | import tempfile | 21 | import tempfile |
22 | 22 | ||
23 | from error import EditorError | 23 | from error import EditorError |
24 | import platform_utils | ||
24 | 25 | ||
25 | class Editor(object): | 26 | class 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) |