Skip to content

Commit 75769e3

Browse files
committed
remove redundant check
1 parent c435139 commit 75769e3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

custom_components/pyscript/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,8 @@ async def generate_stubs_service(call: ServiceCall) -> Dict[str, Any]:
314314
def write_stubs(path) -> dict[str, Any]:
315315
res: dict[str, Any] = {}
316316
try:
317-
if not os.access(path, os.W_OK):
318-
res["status"] = "Error"
319-
res["message"] = f" '{path}' is not writable."
320-
return res
321317
os.makedirs(path, exist_ok=True)
318+
322319
builtins_path = os.path.join(os.path.dirname(__file__), "stubs", "pyscript_builtins.py")
323320
shutil.copy2(builtins_path, path)
324321

0 commit comments

Comments
 (0)