Browse Source

fix python 3.2 str.splitlines() compatibility issue

Thomas Waldmann 9 years ago
parent
commit
0c166898bf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      borg/remote.py

+ 1 - 1
borg/remote.py

@@ -265,7 +265,7 @@ class RemoteRepository:
                     if not data:
                         raise ConnectionClosed()
                     data = data.decode('utf-8')
-                    for line in data.splitlines(keepends=True):
+                    for line in data.splitlines(True):  # keepends=True for py3.3+
                         if line.startswith('$LOG '):
                             _, level, msg = line.split(' ', 2)
                             level = getattr(logging, level, logging.CRITICAL)  # str -> int