Skip to content

Commit

Permalink
fairsoft-ext: Increase log verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisklein committed Sep 29, 2020
1 parent 1806ba8 commit f454f93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extensions/spack-fairsoft/fairsoft/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,18 @@ def compute_symlink_and_target(site, fairsoft, entry):
if os.path.islink(symlink):
readlink = os.readlink(symlink)
if readlink != target:
tty.debug('Removing unexpected symlink {} to {} (expected {})'.
format(symlink, readlink, target))
tty.msg('Removing unexpected symlink {} to {} (expected {})'.format(
symlink, readlink, target))
os.remove(symlink)
if not os.path.exists(os.path.abspath(os.path.join(site,
readlink))):
tty.debug('Removing dangling symlink {} to {}'.format(
tty.msg('Removing dangling symlink {} to {}'.format(
symlink, readlink))
os.remove(symlink)

# Add missing symlinks
for entry in os.listdir(fairsoft):
symlink, target = compute_symlink_and_target(site, fairsoft, entry)
if not (os.path.islink(symlink) and os.readlink(symlink) == target):
tty.debug('Add missing symlink {} to {}'.format(symlink, target))
tty.msg('Add missing symlink {} to {}'.format(symlink, target))
os.symlink(target, symlink)

0 comments on commit f454f93

Please sign in to comment.