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
This commit is contained in:
parent
e8595e9df7
commit
010fed7711
6 changed files with 43 additions and 24 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue