Created remove_readonly method

This commit is contained in:
sTiKyt 2020-05-07 11:21:37 +03:00
parent 2e74ac0aab
commit 027c731678

View File

@ -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)