Skip to content

Commit

Permalink
Merge pull request #71 from lsst-camera-dh/LSSTTD-1527_retry_symlink_…
Browse files Browse the repository at this point in the history
…bug_fix

use shutil to copy the symlink from the previous attempt rather than …
  • Loading branch information
jchiang87 authored Oct 17, 2020
2 parents 12cb150 + ffecc4c commit dcc009c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/bot_acq_retry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import shutil
import glob

def copy_exposure_symlinks(copy_links=True):
Expand All @@ -24,5 +25,5 @@ def copy_exposure_symlinks(copy_links=True):
exposure_name = os.path.basename(item)
num_symlinks += 1
if copy_links and not os.path.islink(exposure_name):
os.symlink(os.path.realpath(item), exposure_name)
shutil.copy(item, exposure_name, follow_symlinks=False)
return num_symlinks

0 comments on commit dcc009c

Please sign in to comment.