Skip to content

Commit 15683e6

Browse files
committed
Handle symbolic links in create_entry_points.py
When creating the entry points we need to first delete them, in case they are sym links (which they may be once #27401 lands).
1 parent 00149c0 commit 15683e6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/maint/create_entry_points.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def make_executable(filename):
7272

7373

7474
def maybe_remove(filename):
75-
if os.path.exists(filename):
75+
if os.path.lexists(filename):
7676
os.remove(filename)
7777

7878

@@ -82,6 +82,7 @@ def read_file(filename):
8282

8383

8484
def write_file(filename, content):
85+
maybe_remove(filename)
8586
with open(filename, 'w', encoding='utf-8') as f:
8687
f.write(content)
8788

0 commit comments

Comments
 (0)