mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-12-14 00:24:05 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user