There are too many duplicated code in xtrabackup command builder functionality also I am using hasattr():
# Checking if extra options were passed:
if hasattr(self, 'xtra_options'):
args += " "
args += self.xtra_options
# Checking if extra backup options were passed:
if hasattr(self, 'xtra_backup'):
args += " "
args += self.xtra_backup
This can be achieved by using try/except.
Also these sections can be grouped together maybe. Will see.
There are too many duplicated code in xtrabackup command builder functionality also I am using
hasattr()
:This can be achieved by using
try/except
. Also these sections can be grouped together maybe. Will see.