File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 12
12
from commitizen import cli , cmd , git
13
13
14
14
15
- def ReadOnlyException (Exception ):
15
+ class ReadOnlyException (Exception ):
16
16
pass
17
17
18
18
19
19
# https://stackoverflow.com/questions/1213706/what-user-do-python-scripts-run-as-in-windows
20
- def handleRemoveReadOnly (func , path , exc ):
20
+ def handle_remove_read_only (func , path , exc ):
21
21
excvalue = exc [1 ]
22
22
if func in (os .rmdir , os .remove , shutil .rmtree ) and excvalue .errno == errno .EACCESS :
23
23
os .chmod (path , stat .S_IRWXU | stat .S_IRWXG | stat .IRWXO ) # 744
@@ -36,7 +36,7 @@ def create_project():
36
36
os .chdir (full_tmp_path )
37
37
yield
38
38
os .chdir (current_directory )
39
- shutil .rmtree (full_tmp_path , handleRemoveReadOnly )
39
+ shutil .rmtree (full_tmp_path , handle_remove_read_only )
40
40
41
41
42
42
def create_file_and_commit (message : str , filename : Optional [str ] = None ):
You can’t perform that action at this time.
0 commit comments