def __init__(self, device, backup_root):
    self.device = device
    self.root = backup_root
    config_pattern = '{}/*/{}'.format(self.root, device)
    configs = glob.glob(config_pattern, recursive=True)
    bkps = [dir[(len(backup_root) + 1):] for dir in configs]
    self.backups = bkps
def __init__(self, device, backup_root):
    self.device = device
    self.root = backup_root
    config_pattern = '{}/*/{}'.format(self.root, device)
    configs = glob.glob(config_pattern, recursive=True)
    bkps = [dir[(len(backup_root) + 1):] for dir in configs]
    self.backups = bkps