From 027c7316787474bd31ccb77e481ab8ba7b07a777 Mon Sep 17 00:00:00 2001 From: sTiKyt Date: Thu, 7 May 2020 11:21:37 +0300 Subject: [PATCH] Created remove_readonly method --- Defs/ActionManager/simple_informant.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Defs/ActionManager/simple_informant.py b/Defs/ActionManager/simple_informant.py index 8efb3af..91b4f1b 100644 --- a/Defs/ActionManager/simple_informant.py +++ b/Defs/ActionManager/simple_informant.py @@ -103,3 +103,8 @@ def port_selector(): # Question where user must select port return choice except: return port_selector() + +def remove_readonly(func, path, _): + "Clear the readonly bit and reattempt the removal" + chmod(path, stat.S_IWRITE) + func(path) \ No newline at end of file