From 010fed771183c23c0e7d04a4e7292782f68de9db Mon Sep 17 00:00:00 2001 From: Renaud Paquay Date: Fri, 11 Nov 2016 14:25:29 -0800 Subject: 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 --- editor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'editor.py') diff --git a/editor.py b/editor.py index 883a1a83..96d7ce4c 100644 --- a/editor.py +++ b/editor.py @@ -21,6 +21,7 @@ import subprocess import tempfile from error import EditorError +import platform_utils class Editor(object): """Manages the user's preferred text editor.""" @@ -107,4 +108,4 @@ least one of these before using this command.""", file=sys.stderr) finally: if fd: os.close(fd) - os.remove(path) + platform_utils.remove(path) -- cgit v1.2.3-54-g00ecf