Skip to content

Commit ab6a480

Browse files
committed
Fix get.py for the case when path doesn't exist
1 parent 444a379 commit ab6a480

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/get.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def unpack(filename, destination):
5757
rename_to = re.match(r'^([a-z][^\-]*\-*)+', dirname).group(0).encode('ascii').strip('-')
5858
if rename_to != dirname:
5959
print('Renaming {0} to {1}'.format(dirname, rename_to))
60-
shutil.rmtree(rename_to)
60+
if os.path.isdir(rename_to):
61+
shutil.rmtree(rename_to)
6162
shutil.move(dirname, rename_to)
6263

6364
def get_tool(tool):

0 commit comments

Comments
 (0)