summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-03-20 14:01:02 +0100
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-03-20 14:01:02 +0100
commita27cb85b21610b4a9f8eb24f8f6cd04902349728 (patch)
treec39e73468f74e73b5907f276f2858a5a9c8b5a3c
parent6d3247b5c02c39a66666a5833106dbc23044e436 (diff)
downloadceph-a27cb85b21610b4a9f8eb24f8f6cd04902349728.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>
-rwxr-xr-xsrc/ceph-disk14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ceph-disk b/src/ceph-disk
index f7a478f9efd..a121b22e808 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: