backuppc_clone.command.SyncAuxiliaryCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A SyncAuxiliaryCommand._handle_command() 0 10 1
1
from backuppc_clone.DataLayer import DataLayer
2
from backuppc_clone.command.BaseCommand import BaseCommand
3
from backuppc_clone.helper.AuxiliaryFiles import AuxiliaryFiles
4
5
6
class SyncAuxiliaryCommand(BaseCommand):
7
    """
8
    Synchronizes the auxiliary files of the clone with the original
9
10
    sync-auxiliary
11
        {clone.cfg : The configuration file of the clone}
12
    """
13
14
    # ------------------------------------------------------------------------------------------------------------------
15
    def _handle_command(self) -> None:
16
        """
17
        Executes the command.
18
        """
19
        self._io.title('Synchronizing Auxiliary Files')
20
21
        helper = AuxiliaryFiles(self._io)
22
        helper.synchronize()
23
24
        DataLayer.instance.commit()
25
26
# ----------------------------------------------------------------------------------------------------------------------
27