ShahriyarR / MySQL-AutoXtraBackup

MySQL-AutoXtraBackup commandline tool written in Python 3 based on Percona XtraBackup
https://autoxtrabackup.azepug.az/
MIT License
140 stars 79 forks source link

Make changes on backup command builder #321

Closed ShahriyarR closed 5 years ago

ShahriyarR commented 5 years ago

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.

ShahriyarR commented 5 years ago

Phase 1 is over and merged. Will be released as part of v1.5.4