8000 Match old and new rsync version format · Develop-Python/backintime@3eceb60 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3eceb60

Browse files
committed
Match old and new rsync version format
1 parent 9310acc commit 3eceb60

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

common/tools.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,12 @@ def rsyncCaps(data = None):
529529
data = proc.communicate()[0]
530530
caps = []
531531
#rsync >= 3.1 does provide --info=progress2
532-
m = re.match(r'rsync\s*version\s*(\d\.\d)', data)
533-
if m and StrictVersion(m.group(1)) >= StrictVersion('3.1'):
534-
caps.append('progress2')
532+
matchers = [r'rsync\s*version\s*(\d\.\d)', r'rsync\s*version\s*v(\d\.\d.\d)']
533+
for matcher in matchers:
534+
m = re.match(matcher, data)
535+
if m and StrictVersion(m.group(1)) >= StrictVersion('3.1'):
536+
caps.append('progress2')
537+
break
535538

536539
#all other capabilities are separated by ',' between
537540
#'Capabilities:' and '\n\n'

0 commit comments

Comments
 (0)
0