ShahriyarR / MySQL-AutoXtraBackup

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

Update copy_back.py #456

Open icy1900 opened 2 years ago

icy1900 commented 2 years ago

there is no key data_dir in options_obj.backup_options, self.backup_options.get("xtra_options") or "" is used to prevent get a None after the --copy-back option, like /usr/bin/xtrabackup --copy-back None --target-dir option --data_dir for xtrabackup should be --datadir

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.06%.

Quality metrics Before After Change
Complexity 1.56 ⭐ 1.61 ⭐ 0.05 👎
Method Length 42.08 ⭐ 42.25 ⭐ 0.17 👎
Working memory 5.62 ⭐ 5.62 ⭐ 0.00
Quality 85.45% 85.39% -0.06% 👎
Other metrics Before After Change
Lines 147 147 0
Changed files Quality Before Quality After Quality Change
mysql_autoxtrabackup/backup_prepare/copy_back.py 85.45% ⭐ 85.39% ⭐ -0.06% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!