Fix dereference-symlink value check error
Currently, freezer use a string 'none' to judge if the parameter 'dereference-symlink' is None or not. This patch will fix it. Change-Id: I661debd0b223059824acd8e2b472a6afe1682b09 Closes-Bug: #1691052
This commit is contained in:
parent
fdf8f07810
commit
63199592fe
@ -63,7 +63,7 @@ class TarCommandBuilder(object):
|
|||||||
'soft' dereference soft links,
|
'soft' dereference soft links,
|
||||||
'hard' dereference hardlinks,
|
'hard' dereference hardlinks,
|
||||||
'all' dereference both.
|
'all' dereference both.
|
||||||
Default 'none'.
|
Default 'None'.
|
||||||
"""
|
"""
|
||||||
self.dereference = self.DEREFERENCE_MODE[mode]
|
self.dereference = self.DEREFERENCE_MODE[mode]
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ class BackupJob(Job):
|
|||||||
|
|
||||||
# Checksum for Backup Consistency
|
# Checksum for Backup Consistency
|
||||||
if self.conf.consistency_check:
|
if self.conf.consistency_check:
|
||||||
ignorelinks = (self.conf.dereference_symlink == 'none' or
|
ignorelinks = (self.conf.dereference_symlink is None or
|
||||||
self.conf.dereference_symlink == 'hard')
|
self.conf.dereference_symlink == 'hard')
|
||||||
consistency_checksum = checksum.CheckSum(
|
consistency_checksum = checksum.CheckSum(
|
||||||
filepath, ignorelinks=ignorelinks).compute()
|
filepath, ignorelinks=ignorelinks).compute()
|
||||||
|
@ -286,7 +286,7 @@ class FakeSwiftClient(object):
|
|||||||
|
|
||||||
class BackupOpt1(object):
|
class BackupOpt1(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.dereference_symlink = 'none'
|
self.dereference_symlink = None
|
||||||
self.mysql_conf = '/tmp/freezer-test-conf-file'
|
self.mysql_conf = '/tmp/freezer-test-conf-file'
|
||||||
self.backup_media = 'fs'
|
self.backup_media = 'fs'
|
||||||
self.lvm_auto_snap = '/dev/null'
|
self.lvm_auto_snap = '/dev/null'
|
||||||
|
@ -95,8 +95,8 @@ restart_always_level = False
|
|||||||
dst_file = False
|
dst_file = False
|
||||||
|
|
||||||
# Follow hard and soft links and archive and dump the
|
# Follow hard and soft links and archive and dump the
|
||||||
# files they refer to. Possible options are {none,soft,hard,all}
|
# files they refer to. Possible options are {None,soft,hard,all}
|
||||||
dereference_symlink = none
|
dereference_symlink = None
|
||||||
|
|
||||||
# Set the hostname used to identify the data you want to
|
# Set the hostname used to identify the data you want to
|
||||||
# restore from. If you want to restore data in the same
|
# restore from. If you want to restore data in the same
|
||||||
|
Loading…
Reference in New Issue
Block a user