mirror of
https://github.com/servo/servo.git
synced 2025-10-05 02:59:19 +01:00
Move delete function to util.py
This makes it easier to reuse in other places.
This commit is contained in:
parent
7413c716fb
commit
b1824f7a05
2 changed files with 14 additions and 12 deletions
|
@ -33,13 +33,7 @@ from servo.command_base import (
|
|||
is_windows,
|
||||
get_browserhtml_path,
|
||||
)
|
||||
|
||||
|
||||
def delete(path):
|
||||
try:
|
||||
os.remove(path) # Succeeds if path was a file
|
||||
except OSError: # Or, if path was a directory...
|
||||
shutil.rmtree(path) # Remove it and all its contents.
|
||||
from servo.util import delete
|
||||
|
||||
|
||||
def otool(s):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue