diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-03-20 14:01:02 +0100 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-04-26 13:40:05 -0700 |
commit | 690ab6b3e284e9beed74b3e77612e804464e467d (patch) | |
tree | 7f15ee15310184fe59e934f107c6483e450909c9 | |
parent | 329f279cd108c837e434ee3aae6c8ad502ba802f (diff) | |
download | ceph-690ab6b3e284e9beed74b3e77612e804464e467d.tar.gz |
ceph-disk: fix adjust_symlink() replace 'canonical' with 'path'
Replace 'canonical' variable with 'path' since canonical doesn't
exist in this function.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit a27cb85b21610b4a9f8eb24f8f6cd04902349728)
-rwxr-xr-x | src/ceph-disk | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ceph-disk b/src/ceph-disk index 741b8532d85..cc473fd7272 100755 --- a/src/ceph-disk +++ b/src/ceph-disk @@ -743,19 +743,19 @@ def adjust_symlink(target, path): create = True if os.path.lexists(path): try: - mode = os.lstat(canonical).st_mode + mode = os.lstat(path).st_mode if stat.S_ISREG(mode): - log.debug('Removing old file %s', canonical) - os.unlink(canonical) + log.debug('Removing old file %s', path) + os.unlink(path) elif stat.S_ISLNK(mode): - old = os.readlink(canonical) + old = os.readlink(path) if old != journal: - log.debug('Removing old symlink %s -> %s', canonical, old) - os.unlink(canonical) + log.debug('Removing old symlink %s -> %s', path, old) + os.unlink(path) else: create = False except: - raise Error('unable to remove (or adjust) old file (symlink)', canonical) + raise Error('unable to remove (or adjust) old file (symlink)', path) if create: log.debug('Creating symlink %s -> %s', path, target) try: |